Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/18/2010 11:50:33 AM (16 years ago)
Author:
apeatling
Message:

Restoring update support to activity items.

File:
1 edited

Legend:

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

    r2273 r2331  
    4848                        return false;
    4949
    50                 /***
    51                  * Before v1.1 of BuddyPress, activity content was calculated at a later point. This is no longer the
    52                  * case, to to be backwards compatible we need to fetch content here to continue.
    53                  */
    54                 if ( empty( $this->content ) || !$this->content ) {
    55                         if ( function_exists( $bp->{$this->component_name}->format_activity_function ) ) {
    56                                 if ( !$fetched_content = call_user_func( $bp->{$this->component_name}->format_activity_function, $this->item_id, $this->user_id, $this->component_action, $this->secondary_item_id, $this->for_secondary_user ) )
    57                                         return false;
    58 
    59                                 $this->content = $fetched_content['content'];
    60                                 $this->primary_link = $fetched_content['primary_link'];
    61                         }
    62                 }
    63 
    6450                if ( !$this->primary_link )
    6551                        $this->primary_link = $bp->loggedin_user->domain;
     
    9783                $activity_ids = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE item_id = %s {$secondary_sql} AND component_name = %s {$component_action_sql} {$user_sql}", $item_id, $component_name ) );
    9884
     85                error_log( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE item_id = %s {$secondary_sql} AND component_name = %s {$component_action_sql} {$user_sql}", $item_id, $component_name ) );
     86
    9987                if ( !$wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE item_id = %s {$secondary_sql} AND component_name = %s {$component_action_sql} {$user_sql}", $item_id, $component_name ) ) )
    10088                        return false;
Note: See TracChangeset for help on using the changeset viewer.