Skip to:
Content

bbPress.org

Changeset 6492


Ignore:
Timestamp:
06/06/2017 05:57:15 AM (5 years ago)
Author:
netweb
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.

Merges [5857] to the 2.5 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/includes/extend/buddypress/activity.php

    r4995 r6492  
    275275
    276276        // Get the activity stream item, bail if it doesn't exist
    277         $existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) );
    278         if ( empty( $existing['total'] ) || ( 1 !== (int) $existing['total'] ) )
     277        $existing = new BP_Activity_Activity( $activity_id );
     278        if ( empty( $existing->component ) ) {
    279279            return null;
     280        }
    280281
    281282        // Return the activity ID since we've verified the connection
Note: See TracChangeset for help on using the changeset viewer.