This is necessary to allow modules to react on publish/unpublish changes to comments.

Please, review attached patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

For consistency, I have modified the patch to also write a notice to watchdog.

Please, review.

moshe weitzman’s picture

if possible, use a diff syntax which shows the function that is being patches. i have this line in my .cvsrc

diff -F^f -u

markus_petrux’s picture

Sorry, 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.

markus_petrux’s picture

Oops. forgot to attach the patch.

markus_petrux’s picture

re-rolled. Please, consider this for 4.7. Thanks

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

verified.

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.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)