function private_node_update in Private 7.2
Same name and namespace in other branches
- 7 private.module \private_node_update()
Implements hook_node_update().
3 calls to private_node_update()
- private_node_access_records in ./
private.module - Implements hook_node_access_records().
- private_node_insert in ./
private.module - Implements hook_node_insert().
- private_node_mark in ./
private.module - Callback for 'Mark as private' node operation
File
- ./
private.module, line 278 - A tremendously simple access control module -- it allows users to mark individual nodes as private; users with 'access private content' perms can read these nodes, while others cannot.
Code
function private_node_update($node) {
db_merge('private')
->key(array(
'nid' => $node->nid,
))
->fields(array(
'nid' => $node->nid,
'private' => (int) $node->private,
))
->execute();
}