当前位置: 首页>>代码示例>>PHP>>正文


PHP AJXP_Node::isRoot方法代码示例

本文整理汇总了PHP中AJXP_Node::isRoot方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_Node::isRoot方法的具体用法?PHP AJXP_Node::isRoot怎么用?PHP AJXP_Node::isRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AJXP_Node的用法示例。


在下文中一共展示了AJXP_Node::isRoot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: switchAction


//.........这里部分代码省略.........
                     if (!is_array($res)) {
                         $url = $res;
                     } else {
                         list($hash, $url) = $res;
                         $newMeta = array("id" => $hash, "type" => "minisite");
                         if ($httpHash != null && $hash != $httpHash) {
                             $originalHash = $httpHash;
                         }
                     }
                     print $url;
                 } else {
                     $data = $this->accessDriver->makePublicletOptions($file, $httpVars["password"], $httpVars["expiration"], $httpVars["downloadlimit"], $this->repository);
                     $customData = array();
                     foreach ($httpVars as $key => $value) {
                         if (substr($key, 0, strlen("PLUGINS_DATA_")) == "PLUGINS_DATA_") {
                             $customData[substr($key, strlen("PLUGINS_DATA_"))] = $value;
                         }
                     }
                     if (count($customData)) {
                         $data["PLUGINS_DATA"] = $customData;
                     }
                     list($hash, $url) = $this->writePubliclet($data, $this->accessDriver, $this->repository);
                     $newMeta = array("id" => $hash, "type" => "file");
                     if (isset($httpVars["format"]) && $httpVars["format"] == "json") {
                         header("Content-type:application/json");
                         echo json_encode(array("element_id" => $hash, "publiclet_link" => $url));
                     } else {
                         header("Content-type:text/plain");
                         echo $url;
                     }
                     flush();
                 }
             }
             if ($newMeta != null && $ajxpNode->hasMetaStore() && !$ajxpNode->isRoot()) {
                 $this->addShareInMeta($ajxpNode, $newMeta["type"], $newMeta["id"], $originalHash);
             }
             AJXP_Controller::applyHook("msg.instant", array("<reload_shared_elements/>", ConfService::getRepository()->getId()));
             // as the result can be quite small (e.g error code), make sure it's output in case of OB active.
             flush();
             break;
         case "toggle_link_watch":
             $file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
             $watchValue = $httpVars["set_watch"] == "true" ? true : false;
             $folder = false;
             $shNode = new AJXP_Node($this->urlBase . $file);
             if (isset($httpVars["element_type"]) && $httpVars["element_type"] == "folder") {
                 $folder = true;
                 $node = new AJXP_Node($this->baseProtocol . "://" . $httpVars["repository_id"] . "/");
             } else {
                 $node = new AJXP_Node($this->urlBase . $file);
             }
             $this->getSharesFromMeta($shNode, $shares, false);
             if (!count($shares)) {
                 break;
             }
             if (isset($httpVars["element_id"]) && isset($shares[$httpVars["element_id"]])) {
                 $elementId = $httpVars["element_id"];
             } else {
                 $sKeys = array_keys($shares);
                 $elementId = $sKeys[0];
             }
             if ($this->watcher !== false) {
                 if (!$folder) {
                     if ($watchValue) {
                         $this->watcher->setWatchOnFolder($node, AuthService::getLoggedUser()->getId(), MetaWatchRegister::$META_WATCH_USERS_READ, array($elementId));
                     } else {
开发者ID:saydulk,项目名称:pydio-core,代码行数:67,代码来源:class.ShareCenter.php


注:本文中的AJXP_Node::isRoot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。