[wp-trac] [WordPress Trac] #11442: Untrashed comments could be deleted by wp_scheduled_delete()
WordPress Trac
wp-trac at lists.automattic.com
Tue Dec 15 15:24:15 UTC 2009
#11442: Untrashed comments could be deleted by wp_scheduled_delete()
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.9
Component: Trash | Version: 2.9
Severity: blocker | Keywords:
--------------------------+-------------------------------------------------
Comment(by nacin):
Never mind, that doesn't make sense. Too late in the process.
In wp_set_comment_status(), before the $wpdb->update:
{{{
if ( 'trash' == $comment_old->comment_approved && $status !=
'trash' )
wp_untrash_comment( $comment_id );
elseif ( 'spam' == $comment_old->comment_approved && $status !=
'spam' )
wp_unspam_comment( $comment_id );
}}}
I think that takes care of this. I can't think of a case why the extra
parameter is necessary, because otherwise the situation this patch would
prevent can occur.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11442#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list