Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the moment it does a raw db_update() which means any code relying on comment hooks is out of luck.
Comment | File | Size | Author |
---|---|---|---|
#7 | 814884.patch | 1.61 KB | catch |
#4 | 814884.patch | 1.57 KB | catch |
#2 | 814884.patch | 1.57 KB | catch |
Comments
Comment #1
catchThere's an additional bug - when the comments are unpublished, the last_comment_uid should fall back to the uid of the most recent published node, not 0.
Either way this patch changes it to do a comment_load_multiple() then comment_save(). It does not implement batch API due to the various issues discussed in #89181: Use queue API for node and comment, user, node multiple deletes - neither queue, nor batch, nor neither are good options.
Comment #2
catchComment #3
suns/cid/uid/
79 critical left. Go review some!
Comment #4
catchShocking.
Comment #5
catchComment #6
moshe weitzman CreditAttribution: moshe weitzman commented$comment->status = 0;
should be COMMENT_PUBLISHED
Comment #7
catchCOMMENT_NOT_PUBLISHED but yes. Also added DRUPAL_ANONYMOUS_RID while I was in there.
Comment #8
Dries CreditAttribution: Dries commentedI can't see anything wrong with this patch. Committed to CVS HEAD. Thanks.