diff --git wp-admin/edit-tags.php wp-admin/edit-tags.php
index 13534de..eaec36c 100644
|
|
|
if ( !current_user_can( $tax->cap->manage_terms ) ) |
| 13 | 13 | wp_die( __( 'Cheatin’ uh?' ) ); |
| 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; |
| 18 | 19 | |
| … |
… |
case 'editedtag': |
| 148 | 149 | break; |
| 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', $_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'); |
| 160 | 171 | if ( current_user_can($tax->cap->edit_terms) ) |
diff --git wp-admin/network/edit.php wp-admin/network/edit.php
index 1e06e49..9d680b4 100644
|
|
|
switch ( $_GET['action'] ) { |
| 427 | 427 | |
| 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', $_REQUEST['paged'], $location ); |
| | 434 | wp_redirect( $location ); |
| 431 | 435 | } |
| 432 | 436 | exit(); |
| 433 | 437 | break; |
diff --git wp-admin/network/users.php wp-admin/network/users.php
index eb59670..c87bfd3 100644
|
|
|
if ( ! current_user_can( 'manage_network_users' ) ) |
| 17 | 17 | wp_die( __( 'You do not have permission to access this page.' ) ); |
| 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'; |
| 24 | 30 | |
diff --git wp-admin/users.php wp-admin/users.php
index 8f08211..78d9ad8 100644
|
|
|
if ( ! current_user_can( 'list_users' ) ) |
| 13 | 13 | wp_die( __( 'Cheatin’ uh?' ) ); |
| 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'; |
| 19 | 19 | |
| … |
… |
default: |
| 290 | 290 | } |
| 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 | |
| 296 | 300 | $messages = array(); |
diff --git wp-includes/user.php wp-includes/user.php
index e39d19e..2a1a101 100644
|
|
|
class WP_User_Query { |
| 542 | 542 | */ |
| 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"); |
| 548 | 548 | } else { |
| 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 | 557 | |
| 555 | | if ( $this->query_vars['count_total'] ) |
| 556 | | $this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where"); |
| 557 | | |
| 558 | 558 | if ( 'all_with_meta' == $this->query_vars['fields'] ) { |
| 559 | 559 | cache_users( $this->results ); |
| 560 | 560 | |