Changeset 18178
- Timestamp:
- 06/07/2011 03:55:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/user.php
r18068 r18178 384 384 'orderby' => 'login', 385 385 'order' => 'ASC', 386 'offset' => '', 'number' => '', 386 'offset' => '', 387 'number' => '', 387 388 'count_total' => true, 388 389 'fields' => 'all', … … 418 419 $this->query_fields = "$wpdb->users.ID"; 419 420 } 421 422 if ( $this->query_vars['count_total'] ) 423 $this->query_fields = 'SQL_CALC_FOUND_ROWS ' . $this->query_fields; 420 424 421 425 $this->query_from = "FROM $wpdb->users"; … … 518 522 $this->query_from .= $clauses['join']; 519 523 $this->query_where .= $clauses['where']; 524 525 if ( 'OR' == $meta_query->relation ) 526 $this->query_fields = 'DISTINCT ' . $this->query_fields; 520 527 } 521 528 … … 547 554 548 555 if ( $this->query_vars['count_total'] ) 549 $this->total_users = $wpdb->get_var( "SELECT COUNT(*) $this->query_from $this->query_where");556 $this->total_users = $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) ); 550 557 551 558 if ( !$this->results )
Note: See TracChangeset
for help on using the changeset viewer.