From 9400a59207d18c3e94239fdb58a61a019eecde97 Mon Sep 17 00:00:00 2001 From: westi Date: Wed, 26 Jan 2011 09:56:17 +0000 Subject: [PATCH] Don't redirect continually on empty search results pages. Fixes #16357 props garyc40 git-svn-id: http://svn.automattic.com/wordpress/trunk@17366 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tags.php | 2 +- wp-admin/network/users.php | 2 +- wp-admin/users.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 613855fedd..5db9aaf29c 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -162,7 +162,7 @@ if ( ! empty($_REQUEST['_wp_http_referer']) ) { $wp_list_table->prepare_items(); $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); -if ( $pagenum > $total_pages ) { +if ( $pagenum > $total_pages && $total_pages > 0 ) { wp_redirect( add_query_arg( 'paged', $total_pages ) ); exit; } diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index c87bfd35f1..6523c9899a 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -21,7 +21,7 @@ $pagenum = $wp_list_table->get_pagenum(); $wp_list_table->prepare_items(); $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); -if ( $pagenum > $total_pages ) { +if ( $pagenum > $total_pages && $total_pages > 0 ) { wp_redirect( add_query_arg( 'paged', $total_pages ) ); exit; } diff --git a/wp-admin/users.php b/wp-admin/users.php index 65ce4a5866..e557d450ac 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -291,7 +291,7 @@ default: $wp_list_table->prepare_items(); $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); - if ( $pagenum > $total_pages ) { + if ( $pagenum > $total_pages && $total_pages > 0 ) { wp_redirect( add_query_arg( 'paged', $total_pages ) ); exit; }