Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

#7199 closed defect (bug) (fixed)

The 'new_blog' activity can be deleted when a contributor is removed from the blog

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 2.6.2 Priority: normal
Severity: normal Version: 2.6.0
Component: Blogs Keywords: has-patch dev-feedback commit
Cc:

Description

Working on #6026, i've noticed 2 things:

  1. When a user is removed from the blog, we are deleting twice the activity (in bp_blogs_remove_blog_for_user() and in bp_blogs_delete_new_blog_activity_for_site()
  2. When a contributor is removed from the blog, although he is not the author of the 'new_blog' activity, the 'new_blog' activity is removed.

I think 1. is some code we forgot to remove in 2.6 while moving code specific to the activity component in bp-blogs-activity.php (see #6937)

About 2. i think it's there for a pretty long time.

See attached patch and unit tests.

Attachments (1)

7199.patch (5.1 KB) - added by imath 9 years ago.

Download all attachments as: .zip

Change History (6)

@imath
9 years ago

This ticket was mentioned in Slack in #buddypress by mercime. View the logs.


9 years ago

#2 @mercime
9 years ago

  • Keywords dev-feedback added

#3 @DJPaul
9 years ago

  • Keywords commit added

I haven't tested your tests -- I assume they fail on the trunk without your patch applied -- but the code changes look good to me!

#4 @imath
9 years ago

In 10970:

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.

See #7199 (branch 2.6)

#5 @imath
9 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 10971:

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)

Note: See TracTickets for help on using tickets.