Skip to:
Content

BuddyPress.org

Changeset 8989


Ignore:
Timestamp:
09/08/2014 05:48:56 PM (10 years ago)
Author:
r-a-y
Message:

bp-legacy: Fix notice when replying to private group activity updates via AJAX.

When a reply is made to an activity update, we have to repopulate the
$activities_template global with the new activity object.

However, when we fetch the new private activity comment, we have to add a
check for the visibility of the item as well. This currently isn't done,
which led to the notices and the non-existence of the activity object.

This commit addresses the issue by setting the show_hidden parameter to
true when fetching the new activity item, ensuring that the
$activities_template->activity object will be set.

Fixes #5862.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r8928 r8989  
    782782
    783783    // Load the new activity item into the $activities_template global
    784     bp_has_activities( 'display_comments=stream&hide_spam=false&include=' . $comment_id );
     784    bp_has_activities( 'display_comments=stream&hide_spam=false&show_hidden=true&include=' . $comment_id );
    785785
    786786    // Swap the current comment with the activity item we just loaded
Note: See TracChangeset for help on using the changeset viewer.