Closed (fixed)
Project:
Moderation
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2011 at 07:16 UTC
Updated:
5 Dec 2011 at 09:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerIt's not so good that this module doesn't use comment_save,
because it does all the logic for us.
To be fair neither comment_publish_action nor comment_unpublish_action recalculate the statistics, too
Comment #2
stefan freudenberg commentedThanks for the patch. Overall the comment module is a bit murky when it comes to publishing/unpublishing. If you change the status to published comment_save_comment() will invoke hook_comment() twice providing update and publish as operation parameter. But if you unpublish a comment that way only the update operation will be invoked.
At first sight it's pretty stunning that the comment actions don't do the job. The idea behind not updating node_comment_statistics in the publish/unpublish operation is that you might publish or unpublish more than one comment of the same node in a mass action and it would be much more efficient to update the node_comment_statistics table only once for each relevant node.
Comment #3
sanduhrsCommited.
Thanks for the patch.
Comment #4
sanduhrs