I feel that _comment_revisions_do_revert should invoke hook_comment with the 'update' op. That is 'basically' whats happening with a reversion. The subject and body of the content are being 'updated' back to a previous state.

I think a full CRUD and possible custom hook system might be the road for a 2.x branch, but I think this fix will at least allow modules that need to respond to comments being changed to do so.

Patch forthcoming.

CommentFileSizeAuthor
#1 1084522_hook_comment.patch1004 byteste-brian

Comments

te-brian’s picture

StatusFileSize
new1004 bytes

Here is the patch.

thinkyhead’s picture

Assigned: Unassigned » thinkyhead
Status: Active » Needs review

Find this patch in the version 1.2 release.

thinkyhead’s picture

For the 1.3 release, I've added code to prevent comment_revisions_comment() creating revisions during the invocation of hook_comment() during a revert.

thinkyhead’s picture

Status: Needs review » Closed (fixed)