comment_approve

Versions
mediamosa-21
comment_approve($cid)

Menu callback; publish specified comment.

Parameters

$cid A comment identifier.

Code

modules/comment/comment.pages.inc, line 108

<?php
function comment_approve($cid) {
  if ($comment = comment_load($cid)) {
    $comment->status = COMMENT_PUBLISHED;
    comment_save($comment);

    drupal_set_message(t('Comment approved.'));
    drupal_goto('node/' . $comment->nid);
  }
  return MENU_NOT_FOUND;
}
?>