Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/30/2016 11:40:55 AM (7 years ago)
Author:
imath
Message:

Only delete the "new_blog" activity when its author is removed from the Blog.

Before this commit, as soon as any contributor was removed from the blog, the "new_blog" activity was also removed although the removed user was not the author of the activity.
It is no more the case. This activity will only be deleted if the user who created the blog is removed from it.
This commit also make sure this activity is not deleted twice as some duplicate code has been left when moving the activity code inside the bp-blogs-activity.php file during the 2.6 dev-cycle.

Fixes #7199 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-functions.php

    r10895 r10971  
    921921
    922922    /**
    923      * Delete activity stream item only if the Activity component is active
    924      *
    925      * @see https://buddypress.trac.wordpress.org/ticket/6937
    926      */
    927     if ( bp_is_active( 'activity' ) ) {
    928         bp_blogs_delete_activity( array(
    929             'item_id'   => $blog_id,
    930             'component' => buddypress()->blogs->id,
    931             'type'      => 'new_blog'
    932         ) );
    933     }
    934 
    935     /**
    936923     * Fires after a blog has been removed from the tracker for a specific user.
    937924     *
Note: See TracChangeset for help on using the changeset viewer.