Skip to:
Content

BuddyPress.org

Ticket #5590: 5590.03.patch

File 5590.03.patch, 908 bytes (added by johnjamesjacoby, 12 years ago)
  • bp-core-classes.php

     
    13311331                        return false;
    13321332                }
    13331333
     1334                $retval = array();
     1335
    13341336                // get cache for single user only
    13351337                // @todo Why only single user?
    13361338                if ( ! is_array( $user_id ) ) {
    13371339                        $cache = wp_cache_get( $user_id, 'bp_last_activity' );
    13381340
    13391341                        if ( false !== $cache ) {
    1340                                 return $cache;
     1342                                $retval[ $user_id ] = $cache;
     1343
     1344                                return $retval;
    13411345                        }
    13421346                }
    13431347
     
    13491353                $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 ) );
    13501354
    13511355                // Re-key
    1352                 $retval = array();
    13531356                foreach ( $last_activities as $last_activity ) {
    13541357                        $retval[ $last_activity->user_id ] = array(
    13551358                                'user_id'       => $last_activity->user_id,