Skip to:
Content

BuddyPress.org

Ticket #6496: update_total.diff

File update_total.diff, 796 bytes (added by tanner m, 10 years ago)
  • bp-core/bp-core-classes.php

    diff --git a/bp-core/bp-core-classes.php b/bp-core/bp-core-classes.php
    index 0eb9b9d..cde342b 100755
    a b class BP_User_Query { 
    545545                        wp_cache_set( 'bp_core_userdata_' . $u->ID, $u, 'bp' );
    546546                }
    547547
    548                 // We calculate total_users using a standalone query, except
    549                 // when a whitelist of user_ids is passed to the constructor.
    550                 // This clause covers the latter situation, and ensures that
    551                 // pagination works when querying by $user_ids.
    552                 if ( empty( $this->total_users ) ) {
    553                         $this->total_users = count( $wp_user_query->results );
    554                 }
     548                // Update the user count to reflect the actual results
     549                $this->total_users = count( $wp_user_query->results );
    555550
    556551                // Reindex for easier matching
    557552                $r = array();