[buddypress-trac] [BuddyPress] #5097: Activity meta data not deleted for the comments of an activity when the activity is deleted (bloating the meta table with orphans)
buddypress-trac
noreply at wordpress.org
Sun Sep 29 04:31:38 UTC 2013
#5097: Activity meta data not deleted for the comments of an activity when the
activity is deleted (bloating the meta table with orphans)
--------------------------+------------------
Reporter: dtc7240 | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 1.9
Component: Activity | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------
Changes (by r-a-y):
* keywords: has-patch early => has-patch
Comment:
`01.patch` addresses the issue of deleting activity meta for activity
comments.
I've chosen to move the deletion of activity comments and meta entries
from the `BP_Activity_Activity::delete()` method to the
`'bp_activity_deleted_activities'` hook.
Patch also adds a unit test and passes when the patch is applied. It
fails when the patch isn't applied.
The negative with this patch is if someone is directly calling
`BP_Activity_Activity::delete()`, their activity comments and meta entries
will not be deleted. A way to remedy this is to remove my
`bp_activity_delete_activity_comments_and_meta()` function and move that
code directly into the static `delete()` method. Either approach would
fix this issue.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5097#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list