Make WordPress Core


Ignore:
Timestamp:
01/25/2011 07:20:20 PM (14 years ago)
Author:
ryan
Message:

Pagination fixes. Props garyc40. fixes #16357

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/user.php

    r17228 r17361  
    543543    function query() {
    544544        global $wpdb;
    545 
     545       
    546546        if ( is_array( $this->query_vars['fields'] ) || 'all' == $this->query_vars['fields'] ) {
    547547            $this->results = $wpdb->get_results("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
     
    549549            $this->results = $wpdb->get_col("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
    550550        }
     551       
     552        if ( $this->query_vars['count_total'] )
     553            $this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where");
    551554
    552555        if ( !$this->results )
    553556            return;
    554 
    555         if ( $this->query_vars['count_total'] )
    556             $this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where");
    557557
    558558        if ( 'all_with_meta' == $this->query_vars['fields'] ) {
Note: See TracChangeset for help on using the changeset viewer.