Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/12/2010 12:31:49 PM (15 years ago)
Author:
apeatling
Message:

Fixing the use of deprecated template tags in bp-default. Merged the fetching of BP runtime settings into one query to significantly reduce the number of run time database hits. Fixed #1916

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-classes.php

    r2576 r2695  
    207207         * We can't add these to the main query above since only users who have this information will be returned (since the much of the data is in usermeta and won't support any type of directional join)
    208208         */
    209         foreach ( (array)$paged_users as $user )
    210             $user_ids[] = $user->id;
    211 
    212         $user_ids = $wpdb->escape( join( ',', (array)$user_ids ) );
    213 
    214         /* Add additional data to the returned results */
    215         if ( $populate_extras )
     209        if ( $populate_extras ) {
     210            foreach ( (array)$paged_users as $user )
     211                $user_ids[] = $user->id;
     212
     213            $user_ids = $wpdb->escape( join( ',', (array)$user_ids ) );
     214
     215            /* Add additional data to the returned results */
    216216            $paged_users = BP_Core_User::get_user_extras( &$paged_users, $user_ids, $type );
     217        }
    217218
    218219        return array( 'users' => $paged_users, 'total' => $total_users );
Note: See TracChangeset for help on using the changeset viewer.