You are here

function notify_comment_insert in Notify 7

Same name and namespace in other branches
  1. 8 notify.module \notify_comment_insert()
  2. 2.0.x notify.module \notify_comment_insert()
  3. 1.0.x notify.module \notify_comment_insert()

Implementation of hook_comment_insert().

Add tracked newly created unpublished comments to the unpublished queue.

File

./notify.module, line 276
Notify module sends e-mail digests of new content and comments.

Code

function notify_comment_insert($comment) {
  if ($comment->status == COMMENT_NOT_PUBLISHED) {
    db_query('INSERT INTO {notify_unpublished_queue} (cid, nid) VALUES (:cid, :nid)', array(
      ':cid' => $comment->cid,
      ':nid' => $comment->nid,
    ));
  }
}