You are here

function private_node_mark_public in Private 7

Same name and namespace in other branches
  1. 6 private.module \private_node_mark_public()

Callback for 'Mark as public' node operation

1 call to private_node_mark_public()
private_set_public_action in ./private.module
Implementation of a Drupal action.
1 string reference to 'private_node_mark_public'
private_node_operations in ./private.module
Implements hook_node_operations().

File

./private.module, line 377
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_public($nids) {
  foreach ($nids as $nid) {
    db_merge('private')
      ->key(array(
      'nid' => $nid,
    ))
      ->fields(array(
      'nid' => $nid,
      'private' => 0,
    ))
      ->execute();
  }
}