You are here

function protected_node_unset_protected in Protected Node 5

Same name and namespace in other branches
  1. 6 protected_node.module \protected_node_unset_protected()
  2. 7 protected_node.module \protected_node_unset_protected()
  3. 1.0.x protected_node.module \protected_node_unset_protected()

This method removes the protected flag from the specified node. If the node wasn't protected this method returns FALSE.

Parameters

int $nid The node id you wish to remove protection from.:

Return value

boolean TRUE if the action was successful, FALSE otherwise.

1 call to protected_node_unset_protected()
protected_node_nodeapi in ./protected_node.module
Implementation of hook_nodeapi(). @link http://api.drupal.org/api/function/hook_nodeapi/5

File

./protected_node.module, line 365

Code

function protected_node_unset_protected($nid) {
  if (!is_numeric($nid)) {
    return FALSE;
  }
  $success = db_query('DELETE FROM {protected_nodes} WHERE nid = %d', $nid);
  return $success !== FALSE;
}