function private_node_mark in Private 7.2
Callback for 'Mark as private' node operation
2 calls to private_node_mark()
- private_set_private_action in ./
private.module - Implementation of a Drupal action.
- private_set_public_action in ./
private.module - Implementation of a Drupal action.
1 string reference to 'private_node_mark'
- private_node_operations in ./
private.module - Implements hook_node_operations().
File
- ./
private.module, line 400 - 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_mark($nids, $private) {
foreach (node_load_multiple($nids, TRUE) as $node) {
if (!$node->privateLocked) {
$node->private = $private;
private_node_update($node);
node_access_acquire_grants($node);
}
}
}