Ticket #5590: 5590.03.patch
| File 5590.03.patch, 908 bytes (added by , 12 years ago) |
|---|
-
bp-core-classes.php
1331 1331 return false; 1332 1332 } 1333 1333 1334 $retval = array(); 1335 1334 1336 // get cache for single user only 1335 1337 // @todo Why only single user? 1336 1338 if ( ! is_array( $user_id ) ) { 1337 1339 $cache = wp_cache_get( $user_id, 'bp_last_activity' ); 1338 1340 1339 1341 if ( false !== $cache ) { 1340 return $cache; 1342 $retval[ $user_id ] = $cache; 1343 1344 return $retval; 1341 1345 } 1342 1346 } 1343 1347 … … 1349 1353 $last_activities = $wpdb->get_results( $wpdb->prepare( "SELECT id, user_id, date_recorded FROM {$bp->members->table_name_last_activity} WHERE component = %s AND type = 'last_activity' AND user_id IN ({$user_ids_sql}) LIMIT {$user_count}", $bp->members->id ) ); 1350 1354 1351 1355 // Re-key 1352 $retval = array();1353 1356 foreach ( $last_activities as $last_activity ) { 1354 1357 $retval[ $last_activity->user_id ] = array( 1355 1358 'user_id' => $last_activity->user_id,