Changeset 17361
- Timestamp:
- 01/25/2011 07:20:20 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-tags.php
r17322 r17361 14 14 15 15 $wp_list_table = _get_list_table('WP_Terms_List_Table'); 16 $pagenum = $wp_list_table->get_pagenum(); 16 17 17 18 $title = $tax->labels->name; … … 149 150 150 151 default: 151 152 152 if ( ! empty($_REQUEST['_wp_http_referer']) ) { 153 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 154 exit; 153 $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ); 154 155 if ( ! empty( $_REQUEST['paged'] ) ) 156 $location = add_query_arg( 'paged', (int) $_REQUEST['paged'] ); 157 158 wp_redirect( $location ); 159 exit; 155 160 } 156 161 157 162 $wp_list_table->prepare_items(); 163 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 164 165 if ( $pagenum > $total_pages ) { 166 wp_redirect( add_query_arg( 'paged', $total_pages ) ); 167 exit; 168 } 158 169 159 170 wp_enqueue_script('admin-tags'); -
trunk/wp-admin/network/edit.php
r17360 r17361 428 428 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) ); 429 429 } else { 430 wp_redirect( network_admin_url( 'users.php' ) ); 430 $location = network_admin_url( 'users.php' ); 431 432 if ( ! empty( $_REQUEST['paged'] ) ) 433 $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); 434 wp_redirect( $location ); 431 435 } 432 436 exit(); -
trunk/wp-admin/network/users.php
r17322 r17361 18 18 19 19 $wp_list_table = _get_list_table('WP_MS_Users_List_Table'); 20 $pagenum = $wp_list_table->get_pagenum(); 20 21 $wp_list_table->prepare_items(); 22 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 21 23 24 if ( $pagenum > $total_pages ) { 25 wp_redirect( add_query_arg( 'paged', $total_pages ) ); 26 exit; 27 } 22 28 $title = __( 'Users' ); 23 29 $parent_file = 'users.php'; -
trunk/wp-admin/users.php
r17345 r17361 14 14 15 15 $wp_list_table = _get_list_table('WP_Users_List_Table'); 16 16 $pagenum = $wp_list_table->get_pagenum(); 17 17 $title = __('Users'); 18 18 $parent_file = 'users.php'; … … 291 291 292 292 $wp_list_table->prepare_items(); 293 293 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 294 if ( $pagenum > $total_pages ) { 295 wp_redirect( add_query_arg( 'paged', $total_pages ) ); 296 exit; 297 } 294 298 include('./admin-header.php'); 295 299 -
trunk/wp-includes/user.php
r17228 r17361 543 543 function query() { 544 544 global $wpdb; 545 545 546 546 if ( is_array( $this->query_vars['fields'] ) || 'all' == $this->query_vars['fields'] ) { 547 547 $this->results = $wpdb->get_results("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit"); … … 549 549 $this->results = $wpdb->get_col("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit"); 550 550 } 551 552 if ( $this->query_vars['count_total'] ) 553 $this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where"); 551 554 552 555 if ( !$this->results ) 553 556 return; 554 555 if ( $this->query_vars['count_total'] )556 $this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where");557 557 558 558 if ( 'all_with_meta' == $this->query_vars['fields'] ) {
Note: See TracChangeset
for help on using the changeset viewer.