You are here

function simplenews_statistics_node_insert in Simplenews Statistics 7

Same name and namespace in other branches
  1. 7.2 simplenews_statistics.module \simplenews_statistics_node_insert()

Implements hook_node_insert().

File

./simplenews_statistics.module, line 101
Main simplenews statistics file.

Code

function simplenews_statistics_node_insert($node) {
  if ($node->type == 'simplenews') {

    // Create corresponding record in {simplenews_statistics} table.
    $record = array(
      'nid' => $node->nid,
    );
    drupal_write_record('simplenews_statistics', $record);
  }
}