You are here

function comment_notify_comment in Comment Notify 5

Same name and namespace in other branches
  1. 5.2 comment_notify.module \comment_notify_comment()
  2. 6 comment_notify.module \comment_notify_comment()

implement hook_comment and check the publish status

File

./comment_notify.module, line 211
This module provides comment follow-up e-mail notification for anonymous and registered users.

Code

function comment_notify_comment($comment, $op) {
  global $user;
  switch ($op) {
    case 'publish':
      _comment_notify_mailalert($comment);
      break;
    case 'update':
    case 'insert':
      $sql = 'UPDATE {comments} set notify = %d where cid = %d';
      db_query($sql, $comment['notify'], $comment['cid']);
      break;
  }
}