Skip to:
Content

bbPress.org

Changeset 5857


Ignore:
Timestamp:
07/16/2015 03:32:23 AM (10 years ago)
Author:
johnjamesjacoby
Message:

BuddyPress: Check for missing activity component when looking for an activity stream item.

This changeset fixes a bug that would result in duplicate activity stream items when editing a topic or reply.

Props r-a-y. Fixes #2690.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/buddypress/activity.php

    r5829 r5857  
    276276
    277277        // Get the activity stream item, bail if it doesn't exist
    278         $existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) );
    279         if ( empty( $existing['total'] ) || ( 1 !== (int) $existing['total'] ) ) {
     278        $existing = new BP_Activity_Activity( $activity_id );
     279        if ( empty( $existing->component ) ) {
    280280            return null;
    281281        }
Note: See TracChangeset for help on using the changeset viewer.