Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/11/2011 04:58:11 PM (13 years ago)
Author:
boonebgorges
Message:

Collect and cache activity meta at the beginning of the activity loop, for quicker lookups. Fixes #3814

File:
1 edited

Legend:

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

    r5484 r5505  
    5151            $this->mptt_right        = $row->mptt_right;
    5252            $this->is_spam           = $row->is_spam;
     53           
     54            bp_activity_update_meta_cache( $this->id );
    5355        }
    5456    }
     
    190192                }
    191193            }
     194        }
     195       
     196        // Get activity meta
     197        $activity_ids = array();
     198        foreach ( (array)$activities as $activity ) {
     199            $activity_ids[] = $activity->id;
     200        }
     201       
     202        if ( !empty( $activity_ids ) ) {
     203            bp_activity_update_meta_cache( $activity_ids );
    192204        }
    193205
Note: See TracChangeset for help on using the changeset viewer.