You are here

function sheetnode_insert in Sheetnode 7.2

Same name and namespace in other branches
  1. 5 sheetnode.module \sheetnode_insert()
  2. 6 sheetnode.module \sheetnode_insert()
  3. 7 sheetnode.module \sheetnode_insert()

Implements hook_insert().

File

./sheetnode.module, line 259
Module file for the sheetnode module.

Code

function sheetnode_insert($node) {
  if ($node->sheetnode['value']) {
    _sheetnode_save($node->nid, $node->vid, $node->sheetnode['value']);
  }
  if ($node->sheetnode['template'] && user_access('create sheetnode template')) {
    _sheetnode_template_save($node->vid, $node->sheetnode['template'], $node->sheetnode['value']);
  }
}