You are here

function protected_node_action_unprotected_all in Protected Node 1.0.x

Same name and namespace in other branches
  1. 6 protected_node.settings.inc \protected_node_action_unprotected_all()
  2. 7 protected_node.settings.inc \protected_node_action_unprotected_all()

Remove all the protections.

This function sets all the protected_node_is_protected to 0.

1 string reference to 'protected_node_action_unprotected_all'
protected_node_admin_settings in ./protected_node.settings.inc
Define the settings form.

File

./protected_node.settings.inc, line 887
Configuration file for the protected_node module.

Code

function protected_node_action_unprotected_all($form, &$form_state) {
  db_update('protected_nodes')
    ->fields(array(
    'protected_node_is_protected' => 0,
  ))
    ->condition('protected_node_is_protected', 1)
    ->execute();
}