From d8b17c9f19b1e43c629dab48c15284a2adab8a37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu>
Date: Wed, 29 Aug 2007 17:01:33 +0000
Subject: [PATCH] #156475 by Christoph C. Cemper and greggles: actually call
 the publish op on hook_comment when a comment is first (automatically)
 published

---
 modules/comment/comment.module | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 03f19f371e06..05f3ef70fc38 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -813,6 +813,9 @@ function comment_save($edit) {
       if ($status == COMMENT_NOT_PUBLISHED) {
         drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.'));
       }
+      else {
+	comment_invoke_comment($edit, 'publish');
+      }
       return $edit['cid'];
     }
     else {
-- 
GitLab