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


PHP AJXP_Controller::registryReset方法代码示例

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


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

示例1: deleteExpiredPubliclet

 /**
  * Find all expired legacy publiclets and remove them.
  * @param $elementId
  * @param $data
  * @throws Exception
  */
 private function deleteExpiredPubliclet($elementId, $data)
 {
     if (AuthService::getLoggedUser() == null || AuthService::getLoggedUser()->getId() != $data["OWNER_ID"]) {
         AuthService::logUser($data["OWNER_ID"], "", true);
     }
     $repoObject = $data["REPOSITORY"];
     if (!is_a($repoObject, "Repository")) {
         $repoObject = ConfService::getRepositoryById($data["REPOSITORY"]);
     }
     $repoLoaded = false;
     if (!empty($repoObject)) {
         try {
             ConfService::loadDriverForRepository($repoObject)->detectStreamWrapper(true);
             $repoLoaded = true;
         } catch (Exception $e) {
             // Cannot load this repository anymore.
         }
     }
     if ($repoLoaded && isset($data["FILE_PATH"])) {
         AJXP_Controller::registryReset();
         $ajxpNode = new AJXP_Node("pydio://" . $repoObject->getId() . $data["FILE_PATH"]);
     }
     $this->deleteShare($data['SHARE_TYPE'], $elementId, false, true);
     if (isset($ajxpNode)) {
         try {
             $this->getMetaManager()->removeShareFromMeta($ajxpNode, $elementId);
         } catch (Exception $e) {
         }
         gc_collect_cycles();
     }
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:37,代码来源:class.ShareStore.php

示例2: loadMinisite


//.........这里部分代码省略.........
     $html = str_replace("PYDIO_APP_TITLE", ConfService::getCoreConf("APPLICATION_TITLE"), $html);
     if (isset($repository) && isset($repoObject)) {
         $html = str_replace("AJXP_START_REPOSITORY", $repository, $html);
         $html = str_replace("AJXP_REPOSITORY_LABEL", ConfService::getRepositoryById($repository)->getDisplay(), $html);
     }
     $html = str_replace('AJXP_HASH_LOAD_ERROR', isset($error) ? $error : '', $html);
     $html = str_replace("AJXP_TEMPLATE_NAME", $templateName, $html);
     $html = str_replace("AJXP_LINK_HASH", $hash, $html);
     $guiConfigs = AJXP_PluginsService::findPluginById("gui.ajax")->getConfigs();
     $html = str_replace("AJXP_THEME", $guiConfigs["GUI_THEME"], $html);
     if (isset($_GET["dl"]) && isset($_GET["file"])) {
         AuthService::$useSession = false;
     } else {
         session_name("AjaXplorer_Shared" . str_replace(".", "_", $hash));
         session_start();
         AuthService::disconnect();
     }
     if (!empty($data["PRELOG_USER"])) {
         AuthService::logUser($data["PRELOG_USER"], "", true);
         $html = str_replace("AJXP_PRELOGED_USER", "ajxp_preloged_user", $html);
     } else {
         if (isset($data["PRESET_LOGIN"])) {
             $_SESSION["PENDING_REPOSITORY_ID"] = $repository;
             $_SESSION["PENDING_FOLDER"] = "/";
             $html = str_replace("AJXP_PRELOGED_USER", $data["PRESET_LOGIN"], $html);
         } else {
             $html = str_replace("AJXP_PRELOGED_USER", "ajxp_legacy_minisite", $html);
         }
     }
     if (isset($hash)) {
         $_SESSION["CURRENT_MINISITE"] = $hash;
     }
     if (isset($_GET["dl"]) && isset($_GET["file"]) && (!isset($data["DOWNLOAD_DISABLED"]) || $data["DOWNLOAD_DISABLED"] === false)) {
         ConfService::switchRootDir($repository);
         ConfService::loadRepositoryDriver();
         AJXP_PluginsService::deferBuildingRegistry();
         AJXP_PluginsService::getInstance()->initActivePlugins();
         AJXP_PluginsService::flushDeferredRegistryBuilding();
         $errMessage = null;
         try {
             $params = $_GET;
             $ACTION = "download";
             if (isset($_GET["ct"])) {
                 $mime = pathinfo($params["file"], PATHINFO_EXTENSION);
                 $editors = AJXP_PluginsService::searchAllManifests("//editor[contains(@mimes,'{$mime}') and @previewProvider='true']", "node", true, true, false);
                 if (count($editors)) {
                     foreach ($editors as $editor) {
                         $xPath = new DOMXPath($editor->ownerDocument);
                         $callbacks = $xPath->query("//action[@contentTypedProvider]", $editor);
                         if ($callbacks->length) {
                             $ACTION = $callbacks->item(0)->getAttribute("name");
                             if ($ACTION == "audio_proxy") {
                                 $params["file"] = "base64encoded:" . base64_encode($params["file"]);
                             }
                             break;
                         }
                     }
                 }
             }
             AJXP_Controller::registryReset();
             AJXP_Controller::findActionAndApply($ACTION, $params, null);
         } catch (Exception $e) {
             $errMessage = $e->getMessage();
         }
         if ($errMessage == null) {
             return;
         }
         $html = str_replace('AJXP_HASH_LOAD_ERROR', $errMessage, $html);
     }
     if (isset($_GET["lang"])) {
         $loggedUser =& AuthService::getLoggedUser();
         if ($loggedUser != null) {
             $loggedUser->setPref("lang", $_GET["lang"]);
         } else {
             setcookie("AJXP_lang", $_GET["lang"]);
         }
     }
     if (!empty($data["AJXP_APPLICATION_BASE"])) {
         $tPath = $data["AJXP_APPLICATION_BASE"];
     } else {
         $tPath = !empty($data["TRAVEL_PATH_TO_ROOT"]) ? $data["TRAVEL_PATH_TO_ROOT"] : "../..";
     }
     $serverBaseUrl = AJXP_Utils::detectServerURL(true);
     // Update Host dynamically if it differ from registered one.
     $registeredHost = parse_url($tPath, PHP_URL_HOST);
     $currentHost = parse_url($serverBaseUrl, PHP_URL_HOST);
     if ($registeredHost != $currentHost) {
         $tPath = str_replace($registeredHost, $currentHost, $tPath);
     }
     // Update scheme dynamically if it differ from registered one.
     $registeredScheme = parse_url($tPath, PHP_URL_SCHEME);
     $currentScheme = parse_url($serverBaseUrl, PHP_URL_SCHEME);
     if ($registeredScheme != $currentScheme) {
         $tPath = str_replace($registeredScheme . "://", $currentScheme . "://", $tPath);
     }
     $html = str_replace("AJXP_PATH_TO_ROOT", rtrim($tPath, "/") . "/", $html);
     HTMLWriter::internetExplorerMainDocumentHeader();
     HTMLWriter::charsetHeader();
     echo $html;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:101,代码来源:class.MinisiteRenderer.php


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