Opened 9 years ago
Closed 9 years ago
#2945 closed defect (bug) (fixed)
Post revisions are not deleted when resetting the forums
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Tools | Keywords: | needs-unit-tests has-patch |
Cc: |
Description
Running the "Reset Forums" tool deletes all bbPress posts (forums, topics, and replies) but does not delete any of the post revisions if there were any for their respective posts.
This should be a relatively easy fix in bbp_admin_reset_handler()
, currently we get an array of bbPress post ID's and loop through each of those to delete each wp_postmeta
value, we should be able to do the same for each post revision in wp_posts
by matching the post_parent
with post ID
.
Attached is a quick patch that should work fine, some unit tests will to confirm nothing untoward occurs are needed.
In 6091: