From d3fbaa1d66651430d4e727edfd5c3c244387b395 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 17 Mar 2008 23:02:12 +0000 Subject: [PATCH] Remove remnants of infinite posts features. Props mdawaffe. fixes #6264 git-svn-id: http://svn.automattic.com/wordpress/trunk@7359 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-attachment-rows.php | 7 ++----- wp-admin/edit-post-rows.php | 5 ++--- wp-admin/edit.php | 2 +- wp-admin/upload.php | 5 +---- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index bcf65df7d..df00d5d10 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -19,14 +19,11 @@ \n\t\n"; // Hack! -$class = ( $i_post > 15 || 'alternate' == $class) ? '' : 'alternate'; +while (have_posts()) : the_post(); +$class = 'alternate' == $class ? '' : 'alternate'; global $current_user; $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); ?> diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index a3aac87e7..fe35557de 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -19,12 +19,11 @@ 15 || 'alternate' == $class) ? '' : 'alternate'; +while (have_posts()) : the_post(); +$class = 'alternate' == $class ? '' : 'alternate'; global $current_user; $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); ?> diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 80346b188..24e231af6 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -126,7 +126,7 @@ endif; $page_links = paginate_links( array( 'base' => add_query_arg( 'paged', '%#%' ), 'format' => '', - 'total' => ceil($wp_query->found_posts / 15), + 'total' => $wp_query->max_num_pages, 'current' => $_GET['paged'] )); diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 90bd17996..89a3404b1 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -33,10 +33,7 @@ $title = __('Media Library'); $parent_file = 'edit.php'; wp_enqueue_script( 'admin-forms' ); -if ( isset($_GET['paged']) && $start = ( intval($_GET['paged']) - 1 ) * 15 ) - add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 15';" ) ); list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); -$wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra ) if ( is_singular() ) wp_enqueue_script( 'admin-comments' ); @@ -128,7 +125,7 @@ endif; $page_links = paginate_links( array( 'base' => add_query_arg( 'paged', '%#%' ), 'format' => '', - 'total' => ceil($wp_query->found_posts / 15), + 'total' => $wp_query->max_num_pages, 'current' => $_GET['paged'] ));