Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2009 08:08:26 PM (16 years ago)
Author:
apeatling
Message:

Fixes #340

File:
1 edited

Legend:

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

    r1052 r1062  
    4646        global $wpdb, $bp, $current_user;
    4747
    48         if ( !$this->item_id || !$this->user_id || $this->is_private )
     48        if ( !$this->item_id || !$this->user_id || $this->is_private || !$this->component_name )
    4949            return false;
    5050           
     
    161161            $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name_current_user} WHERE date_recorded >= FROM_UNIXTIME(%d) $privacy_sql ORDER BY date_recorded DESC LIMIT 30", $since ) );
    162162
    163             for ( $i = 0; $i < count( $activities ); $i++ ) {           
     163            for ( $i = 0; $i < count( $activities ); $i++ ) {
     164               
     165                if ( !$activities[$i]->component_name ) continue;
     166                       
    164167                if ( function_exists( $bp->{$activities[$i]->component_name}->format_activity_function ) ) {   
    165168                    if ( !$content = call_user_func( $bp->{$activities[$i]->component_name}->format_activity_function, $activities[$i]->item_id, $activities[$i]->user_id, $activities[$i]->component_action, $activities[$i]->secondary_item_id ) )
Note: See TracChangeset for help on using the changeset viewer.