You are here

function notify_node_insert in Notify 7

Implementation of hook_node_insert().

Add tracked newly created unpublished nodes to the unpublished queue.

File

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

Code

function notify_node_insert($node) {
  if ($node->status == NODE_NOT_PUBLISHED) {
    db_query('INSERT INTO {notify_unpublished_queue} (cid, nid) VALUES (:cid, :nid)', array(
      ':cid' => 0,
      ':nid' => $node->nid,
    ));
  }
}