/**
  * @param AJXP_Node $fromNode
  * @param AJXP_Node $toNode
  * @param bool $copy
  */
 public function handleNodeChange($fromNode = null, $toNode = null, $copy = false)
 {
     if ($fromNode == null) {
         return;
     }
     if ($toNode == null) {
         $fromNode->removeMetadata("etherpad", AJXP_METADATA_ALLUSERS, AJXP_METADATA_SCOPE_GLOBAL, false);
     } else {
         if (!$copy) {
             $toNode->copyOrMoveMetadataFromNode($fromNode, "etherpad", "move", AJXP_METADATA_ALLUSERS, AJXP_METADATA_SCOPE_GLOBAL, false);
         }
     }
 }
 /**
  * @param AJXP_Node $fromNode
  * @param AJXP_Node $toNode
  * @param bool $copy
  */
 public function nodeChangeBookmarkMetadata($fromNode = null, $toNode = null, $copy = false)
 {
     if ($copy || $fromNode == null) {
         return;
     }
     $user = AuthService::getLoggedUser();
     if ($user == null) {
         return;
     }
     if (!isset(self::$loadedBookmarks)) {
         self::$loadedBookmarks = $user->getBookmarks();
     }
     if ($toNode == null) {
         $fromNode->removeMetadata("ajxp_bookmarked", true, AJXP_METADATA_SCOPE_REPOSITORY, true);
     } else {
         $toNode->copyOrMoveMetadataFromNode($fromNode, "ajxp_bookmarked", "move", true, AJXP_METADATA_SCOPE_REPOSITORY, true);
     }
     AJXP_Controller::applyHook("msg.instant", array("<reload_bookmarks/>", $fromNode->getRepositoryId(), AuthService::getLoggedUser()->getId()));
 }