You are here

function internal_nodes_node_insert in Internal Nodes 7

Implements hook_node_insert().

1 call to internal_nodes_node_insert()
internal_nodes_node_update in ./internal_nodes.module
Implements hook_node_update().

File

./internal_nodes.module, line 402
Internal nodes

Code

function internal_nodes_node_insert($node) {
  if (variable_get('internal_nodes_nodes_' . $node->type, 0)) {
    db_insert('internal_nodes')
      ->fields(array(
      'nid' => $node->nid,
      'action' => $node->internal_nodes['action'],
      'url' => $node->internal_nodes['url'],
    ))
      ->execute();
  }
}