function _node_access_test_node_write in Drupal 7
Helper for node insert/update.
2 calls to _node_access_test_node_write()
- node_access_test_node_insert in modules/
node/ tests/ node_access_test.module - Implements hook_node_insert().
- node_access_test_node_update in modules/
node/ tests/ node_access_test.module - Implements hook_node_update().
File
- modules/
node/ tests/ node_access_test.module, line 223 - A dummy module implementing node access related hooks for testing purposes.
Code
function _node_access_test_node_write($node) {
if (isset($node->private)) {
db_merge('node_access_test')
->key(array(
'nid' => $node->nid,
))
->fields(array(
'private' => (int) $node->private,
))
->execute();
}
}