You are here

function spam_publish_comment in Spam 5

Publish a comment.

1 string reference to 'spam_publish_comment'
spam_comment_operations in ./spam.module
Return the function to call dependant on the $action requested.

File

./spam.module, line 2987

Code

function spam_publish_comment($cid) {
  if ($comment = spam_load_comment($cid)) {
    db_query('UPDATE {comments} SET status = 0 WHERE cid = %d', $comment->cid);
    _comment_update_node_statistics($comment->nid);
    cache_clear_all();
    watchdog('spam', t('Spam: published comment "%subject".', array(
      '%subject' => $comment->subject,
    )));
    spam_log(SPAM_LOG, t('spam_publish_comment: published comment "%subject".', array(
      '%subject' => $comment->subject,
    )), 'comment', $comment->cid);
  }
}