[buddypress-trac] [BuddyPress Trac] #3794: Deleted activity items remain favourited

buddypress-trac noreply at wordpress.org
Sat Sep 27 16:43:28 UTC 2014

#3794: Deleted activity items remain favourited
 Reporter:  ewebber       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.2
Component:  Activity      |     Version:  1.5.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |

Comment (by imath):

 thanks for your feedback :)

 I've added 9 tests to the one that is checking if the favorite count gets
 updated once a favorited activity is deleted.
 Tests includes new {{{bp_activity_add_favorite()}}} and the migrate
 function (see 3794.unittest.02.patch)

 It made me change a bit the patch (see 3794.03.patch):
 - The activity fav_count update should happen after the
 'activity_favorite' activity is created in
 {{{bp_activity_add_favorite()}}}, as this function is checking if the
 parent activity exists.
 - in {{{bp_activity_add_favorite()}}}, if the parent  activity is
 {{{hide_sitewide}}} then the 'activity_favorite' activity will also be
 {{{hide_sitewide}}}. This is an extra security, as anyway the visibility
 of the parent activity is used when listing favorites

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3794#comment:12>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list