You are here

function protected_node_isset_protected in Protected Node 6

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

This method determines the protected flag status for the given node id.

Note that doesn't mean the node is protected for the current user (i.e. the current user may have entered the password successfully.)

@param[in] int $nid The node id to check.

Return value

boolean TRUE if the node identified by the nid you provided is protected, FALSE otherwise.

1 call to protected_node_isset_protected()
protected_node_boost_is_cacheable in ./protected_node.module
Prevent boost from caching protected nodes.

File

./protected_node.module, line 952

Code

function protected_node_isset_protected($nid) {
  if (!is_numeric($nid)) {
    return FALSE;
  }
  return db_result(db_query("SELECT protected_node_is_protected FROM {protected_nodes} WHERE nid = %d", $nid)) == 1;
}