Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.617.2.6
diff -u -p -r1.617.2.6 comment.module
--- modules/comment/comment.module	5 Apr 2009 12:04:52 -0000	1.617.2.6
+++ modules/comment/comment.module	19 Apr 2009 15:58:09 -0000
@@ -2037,18 +2037,26 @@ function comment_action_info() {
       'configurable' => TRUE,
       'hooks' => array(
         'comment' => array('insert', 'update'),
-      )
-    )
+      ),
+    ),
+    'comment_publish_action' => array(
+      'description' => t('Publish comment'),
+      'type' => 'comment',
+      'configurable' => FALSE,
+      'hooks' => array(
+        'comment' => array('insert', 'update'),
+      ),
+    ),
   );
 }
 
 /**
  * Drupal action to unpublish a comment.
  *
- * @param $context
- *   Keyed array. Must contain the id of the comment if $comment is not passed.
  * @param $comment
  *   An optional comment object.
+ * @param $context
+ *   Keyed array. Must contain the id of the comment if $comment is not passed.
  */
 function comment_unpublish_action($comment, $context = array()) {
   if (isset($comment->cid)) {
@@ -2064,6 +2072,28 @@ function comment_unpublish_action($comme
 }
 
 /**
+ * Drupal action to publish a comment.
+ *
+ * @param $comment
+ *   An optional comment object.
+ * @param $context
+ *   Keyed array. Must contain the id of the comment if $comment is not passed.
+ *
+ */
+function comment_publish_action($comment, $context = array()) {
+  if (isset($comment->cid)) {
+    $cid = $comment->cid;
+    $subject = $comment->subject;
+  }
+  else {
+    $cid = $context['cid'];
+    $subject = db_result(db_query("SELECT subject FROM {comments} WHERE cid = %d", $cid));
+  }
+  db_query('UPDATE {comments} SET status = %d WHERE cid = %d', COMMENT_PUBLISHED, $cid);
+  watchdog('action', 'Published comment %subject.', array('%subject' => $subject));
+}
+
+/**
  * Form builder; Prepare a form for blacklisted keywords.
  *
  * @ingroup forms
