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.
This is necessary to allow modules to react on publish/unpublish changes to comments.
Please, review attached patch.
Comment | File | Size | Author |
---|---|---|---|
#5 | comment.module.admin_approval_hooks_0.patch | 742 bytes | markus_petrux |
#4 | comment.module.admin_approval_hooks.patch | 740 bytes | markus_petrux |
#1 | comment.module.admin_update_hook_0.patch | 690 bytes | markus_petrux |
comment.module.admin_update_hook.patch | 422 bytes | markus_petrux | |
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedFor consistency, I have modified the patch to also write a notice to watchdog.
Please, review.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedif possible, use a diff syntax which shows the function that is being patches. i have this line in my .cvsrc
diff -F^f -u
Comment #3
markus_petrux CreditAttribution: markus_petrux commentedSorry, moshe. I generate patches with WinMerge and there is not such an option. I have manually added the function name. I hope that is ok.
Also, I have changed the patch so it now, instead of invoking hook_comment('update'), it invokes hook_comment('publish') or hook_comment('unpublish'). I believe that is much wiser.
Comment #4
markus_petrux CreditAttribution: markus_petrux commentedOops. forgot to attach the patch.
Comment #5
markus_petrux CreditAttribution: markus_petrux commentedre-rolled. Please, consider this for 4.7. Thanks
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedverified.
in a separate patch, perhaps someone can also remove those excessive drupal_goto() calls in the validate and submit part of this admin form. you are supposed to return a path from submit now. in validate, you may simply omit the drupal_goto() entirely.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #8
(not verified) CreditAttribution: commented