307,358c307
< }
< 
< /**
<  * This method checks if the user has entered the password for the given node id.
<  * Works only on protected nodes.
<  *
<  * @param int $nid The node id you wish to check for.
<  * @return boolean TRUE if the node identified by the nid you provided is unlocked by the user, FALSE otherwise.
<  */
< function protected_node_is_locked($nid) {
<   if (!protected_node_isset_protected( $nid )) {
<     return FALSE;
<   }
<   else {
<     return !isset( $_SESSION['_protected_node']['passwords'][$nid] );
<   }
< }
< 
< /**
<  * This method removes the password that was previously given by the user thus requiring the password again
<  * Works only on protected nodes.
<  *
<  * @param int $nid The node id you wish to check for.
<  * @return boolean TRUE if the lock was successful.
<  */
< function protected_node_lock($nid) {
<   if (!protected_node_isset_protected( $nid )) {
<     return FALSE;
<   }
<   else {
<     unset( $_SESSION['_protected_node']['passwords'][$nid] );
<     return TRUE;
<   }
< }
< 
< /**
<  * This method unlocks the node by simulating the password submittion by the user.
<  * Works only on protected nodes.
<  *
<  * @param int $nid The node id you wish to unlock.
<  * @return boolean TRUE if the node identified by the nid you provided is unlocked, FALSE otherwise.
<  */
< function protected_node_unlock($nid, $password) {
<   if (!protected_node_isset_protected( $nid )) {
<     return FALSE;
<   }
<   else {
<     // check the password before setting the session variable
<     $_SESSION['_protected_node']['passwords'][$nid] = TRUE;
<     return TRUE;
<   }
< }
---
> }
\ No newline at end of file
