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


PHP AJXP_Plugin::parseSpecificContributions方法代码示例

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


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

示例1: parseSpecificContributions

 /**
  * Parse
  * @param DOMNode $contribNode
  */
 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if ($this->pluginConf["ENABLE_324_IMPORT"] == true) {
         return;
     }
     if ($contribNode->nodeName != "actions") {
         return;
     }
     $actionXpath = new DOMXPath($contribNode->ownerDocument);
     $compressNodeList = $actionXpath->query('action[@name="import_from_324"]', $contribNode);
     if (!$compressNodeList->length) {
         return;
     }
     unset($this->actions["import_from_324"]);
     $compressNode = $compressNodeList->item(0);
     $contribNode->removeChild($compressNode);
     $compressNodeList = $actionXpath->query('action[@name="migrate_metaserial"]', $contribNode);
     if (!$compressNodeList->length) {
         return;
     }
     unset($this->actions["import_from_324"]);
     $compressNode = $compressNodeList->item(0);
     $contribNode->removeChild($compressNode);
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:29,代码来源:class.UpdateController.php

示例2: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (isset($this->actions["share"])) {
         $disableSharing = false;
         $downloadFolder = ConfService::getCoreConf("PUBLIC_DOWNLOAD_FOLDER");
         if ($downloadFolder == "") {
             $disableSharing = true;
         } else {
             if (!is_dir($downloadFolder) || !is_writable($downloadFolder)) {
                 $this->logDebug("Disabling Public links, {$downloadFolder} is not writeable!", array("folder" => $downloadFolder, "is_dir" => is_dir($downloadFolder), "is_writeable" => is_writable($downloadFolder)));
                 $disableSharing = true;
             } else {
                 if (AuthService::usersEnabled()) {
                     $loggedUser = AuthService::getLoggedUser();
                     if ($loggedUser != null && AuthService::isReservedUserId($loggedUser->getId())) {
                         $disableSharing = true;
                     }
                 } else {
                     $disableSharing = true;
                 }
             }
         }
         if ($disableSharing) {
             unset($this->actions["share"]);
             $actionXpath = new DOMXPath($contribNode->ownerDocument);
             $publicUrlNodeList = $actionXpath->query('action[@name="share"]', $contribNode);
             $publicUrlNode = $publicUrlNodeList->item(0);
             $contribNode->removeChild($publicUrlNode);
         }
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:32,代码来源:class.ShareCenter.php

示例3: parseSpecificContributions

 public function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if ($contribNode->nodeName != "actions") {
         return;
     }
     $actionXpath = new DOMXPath($contribNode->ownerDocument);
     $paramList = $actionXpath->query('action[@name="scheduler_addTask"]/processing/standardFormDefinition/param[@name="repository_id"]', $contribNode);
     if (!$paramList->length) {
         return;
     }
     $paramNode = $paramList->item(0);
     $sVals = array();
     $repos = ConfService::getRepositoriesList("all");
     foreach ($repos as $repoId => $repoObject) {
         $sVals[] = $repoId . "|" . AJXP_Utils::xmlEntities($repoObject->getDisplay());
     }
     $sVals[] = "*|All Repositories";
     $paramNode->attributes->getNamedItem("choices")->nodeValue = implode(",", $sVals);
     if (!AuthService::usersEnabled() || AuthService::getLoggedUser() == null) {
         return;
     }
     $paramList = $actionXpath->query('action[@name="scheduler_addTask"]/processing/standardFormDefinition/param[@name="user_id"]', $contribNode);
     if (!$paramList->length) {
         return;
     }
     $paramNode = $paramList->item(0);
     $paramNode->attributes->getNamedItem("default")->nodeValue = AuthService::getLoggedUser()->getId();
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:29,代码来源:class.AjxpScheduler.php

示例4: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if ($this->detectStreamWrapper() !== false) {
         $this->actions["cross_copy"] = array();
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:7,代码来源:class.AbstractAccessDriver.php

示例5: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (isset($this->actions["share"])) {
         $disableSharing = false;
         $downloadFolder = ConfService::getCoreConf("PUBLIC_DOWNLOAD_FOLDER");
         if ($downloadFolder == "") {
             $disableSharing = true;
         } else {
             if (!is_dir($downloadFolder) || !is_writable($downloadFolder)) {
                 $this->logDebug("Disabling Public links, {$downloadFolder} is not writeable!", array("folder" => $downloadFolder, "is_dir" => is_dir($downloadFolder), "is_writeable" => is_writable($downloadFolder)));
                 $disableSharing = true;
             } else {
                 if (AuthService::usersEnabled()) {
                     $loggedUser = AuthService::getLoggedUser();
                     if ($loggedUser != null && AuthService::isReservedUserId($loggedUser->getId())) {
                         $disableSharing = true;
                     }
                 } else {
                     $disableSharing = true;
                 }
             }
         }
         $repo = ConfService::getRepository();
         // Hacky but necessary to edit roles...
         if (!is_a($repo->driverInstance, "AjxpWrapperProvider") && !(isset($_GET["get_action"]) && $_GET["get_action"] == "list_all_plugins_actions")) {
             $disableSharing = true;
         }
         $xpathesToRemove = array();
         if ($disableSharing) {
             // All share- actions
             $xpathesToRemove[] = 'action[contains(@name, "share-")]';
         } else {
             $folderSharingAllowed = $this->getAuthorization("folder", "any");
             // $this->pluginConf["ENABLE_FOLDER_SHARING"];
             $fileSharingAllowed = $this->getAuthorization("file");
             //$this->pluginConf["ENABLE_FILE_PUBLIC_LINK"];
             if ($fileSharingAllowed === false) {
                 // Share file button
                 $xpathesToRemove[] = 'action[@name="share-file-minisite"]';
             }
             if (!$folderSharingAllowed) {
                 // Share folder button
                 $xpathesToRemove[] = 'action[@name="share-folder-minisite-public"]';
             }
         }
         foreach ($xpathesToRemove as $xpath) {
             $actionXpath = new DOMXPath($contribNode->ownerDocument);
             $nodeList = $actionXpath->query($xpath, $contribNode);
             foreach ($nodeList as $shareActionNode) {
                 $contribNode->removeChild($shareActionNode);
             }
         }
     }
 }
开发者ID:saydulk,项目名称:pydio-core,代码行数:55,代码来源:class.ShareCenter.php

示例6: parseSpecificContributions

 public function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (!self::rsyncEnabled() && $contribNode->nodeName == "actions") {
         // REMOVE rsync actions, this will advertise the fact that
         // rsync is not enabled.
         $xp = new DOMXPath($contribNode->ownerDocument);
         $children = $xp->query("action", $contribNode);
         foreach ($children as $child) {
             $contribNode->removeChild($child);
         }
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:13,代码来源:class.FileHasher.php

示例7: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if ($contribNode->nodeName != "actions") {
         return;
     }
     // WEBDAV ACTION
     if (empty($this->pluginConf["USER_EVENTS"])) {
         unset($this->actions["get_my_feed"]);
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
         $publicUrlNodeList = $actionXpath->query('action[@name="get_my_feed"]', $contribNode);
         $publicUrlNode = $publicUrlNodeList->item(0);
         $contribNode->removeChild($publicUrlNode);
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:15,代码来源:class.AJXP_NotificationCenter.php

示例8: parseSpecificContributions

 /**
  * Extend parent
  * @param DOMNode $contribNode
  */
 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     $disableSharing = false;
     $downloadFolder = ConfService::getCoreConf("PUBLIC_DOWNLOAD_FOLDER");
     if (empty($downloadFolder) || (!is_dir($downloadFolder) || !is_writable($downloadFolder))) {
         $this->logError("Warning on public links, {$downloadFolder} is not writeable!", array("folder" => $downloadFolder, "is_dir" => is_dir($downloadFolder), "is_writeable" => is_writable($downloadFolder)));
     }
     $xpathesToRemove = array();
     if (strpos(ConfService::getRepository()->getAccessType(), "ajxp_") === 0) {
         $xpathesToRemove[] = 'action[@name="share-file-minisite"]';
         $xpathesToRemove[] = 'action[@name="share-folder-minisite-public"]';
         $xpathesToRemove[] = 'action[@name="share-edit-shared"]';
     } else {
         if (AuthService::usersEnabled()) {
             $loggedUser = AuthService::getLoggedUser();
             if ($loggedUser != null && AuthService::isReservedUserId($loggedUser->getId())) {
                 $disableSharing = true;
             }
         } else {
             $disableSharing = true;
         }
     }
     if ($disableSharing) {
         // All share- actions
         $xpathesToRemove[] = 'action[contains(@name, "share-")]';
     } else {
         $folderSharingAllowed = $this->getAuthorization("folder", "any");
         $fileSharingAllowed = $this->getAuthorization("file", "any");
         if ($fileSharingAllowed === false) {
             // Share file button
             $xpathesToRemove[] = 'action[@name="share-file-minisite"]';
         }
         if (!$folderSharingAllowed) {
             // Share folder button
             $xpathesToRemove[] = 'action[@name="share-folder-minisite-public"]';
         }
     }
     foreach ($xpathesToRemove as $xpath) {
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
         $nodeList = $actionXpath->query($xpath, $contribNode);
         foreach ($nodeList as $shareActionNode) {
             $contribNode->removeChild($shareActionNode);
         }
     }
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:50,代码来源:class.ShareCenter.php

示例9: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     // DISABLE STUFF
     if (empty($this->pluginConf["USER_EVENTS"])) {
         if ($contribNode->nodeName == "actions") {
             $actionXpath = new DOMXPath($contribNode->ownerDocument);
             $publicUrlNodeList = $actionXpath->query('action[@name="get_my_feed"]', $contribNode);
             $publicUrlNode = $publicUrlNodeList->item(0);
             $contribNode->removeChild($publicUrlNode);
         } else {
             if ($contribNode->nodeName == "client_configs") {
                 $actionXpath = new DOMXPath($contribNode->ownerDocument);
                 $children = $actionXpath->query('component_config', $contribNode);
                 foreach ($children as $child) {
                     $contribNode->removeChild($child);
                 }
             }
         }
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:21,代码来源:class.AJXP_NotificationCenter.php

示例10: parseSpecificContributions

 public function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (!self::rsyncEnabled() && $contribNode->nodeName == "actions") {
         // REMOVE rsync actions, this will advertise the fact that
         // rsync is not enabled.
         $xp = new DOMXPath($contribNode->ownerDocument);
         $children = $xp->query("action[contains(@name, 'filehasher')]", $contribNode);
         foreach ($children as $child) {
             $contribNode->removeChild($child);
         }
     }
     if ($this->getFilteredOption("CACHE_XML_TREE") !== true && $contribNode->nodeName == "actions") {
         // REMOVE pre and post process on LS action
         $xp = new DOMXPath($contribNode->ownerDocument);
         $children = $xp->query("action[@name='ls']", $contribNode);
         foreach ($children as $child) {
             $contribNode->removeChild($child);
         }
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:21,代码来源:class.FileHasher.php

示例11: parseSpecificContributions

 /**
  * Parse
  * @param DOMNode $contribNode
  */
 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (substr($_SERVER["REQUEST_URI"], 0, strlen('/user')) != '/user') {
         if ($contribNode->nodeName == "client_configs") {
             $children = $contribNode->childNodes;
             foreach ($children as $child) {
                 if ($child->nodeType == XML_ELEMENT_NODE) {
                     $contribNode->removeChild($child);
                 }
             }
         } else {
             if ($contribNode->nodeName == "actions") {
                 $children = $contribNode->childNodes;
                 foreach ($children as $child) {
                     if ($child->nodeType == XML_ELEMENT_NODE && $child->nodeName == "action" && $child->getAttribute("name") == "login") {
                         $contribNode->removeChild($child);
                     }
                 }
             }
         }
     }
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:27,代码来源:class.UserGuiController.php

示例12: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (!ConfService::getCoreConf("WEBDAV_ENABLE") && $contribNode->nodeName == "actions") {
         unset($this->actions["webdav_preferences"]);
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
         $publicUrlNodeList = $actionXpath->query('action[@name="webdav_preferences"]', $contribNode);
         $publicUrlNode = $publicUrlNodeList->item(0);
         $contribNode->removeChild($publicUrlNode);
     }
     if (!ConfService::getCoreConf("USER_CREATE_REPOSITORY", "conf") && $contribNode->nodeName == "actions") {
         unset($this->actions["user_create_repository"]);
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
         $publicUrlNodeList = $actionXpath->query('action[@name="user_create_repository"]', $contribNode);
         $publicUrlNode = $publicUrlNodeList->item(0);
         $contribNode->removeChild($publicUrlNode);
         unset($this->actions["user_delete_repository"]);
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
         $publicUrlNodeList = $actionXpath->query('action[@name="user_delete_repository"]', $contribNode);
         $publicUrlNode = $publicUrlNodeList->item(0);
         $contribNode->removeChild($publicUrlNode);
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:23,代码来源:class.AbstractConfDriver.php

示例13: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if ($contribNode->nodeName != "actions") {
         return;
     }
     if (AuthService::usersEnabled() && $this->passwordsEditable()) {
         return;
     }
     // Disable password change action
     if (!isset($actionXpath)) {
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
     }
     $passChangeNodeList = $actionXpath->query('action[@name="pass_change"]', $contribNode);
     if (!$passChangeNodeList->length) {
         return;
     }
     unset($this->actions["pass_change"]);
     $passChangeNode = $passChangeNodeList->item(0);
     $contribNode->removeChild($passChangeNode);
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:21,代码来源:class.AbstractAuthDriver.php

示例14: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (isset($this->actions["public_url"]) && (!is_dir(PUBLIC_DOWNLOAD_FOLDER) || !is_writable(PUBLIC_DOWNLOAD_FOLDER))) {
         AJXP_Logger::logAction("Disabling Public links, PUBLIC_DOWNLOAD_FOLDER is not writeable!", array("folder" => PUBLIC_DOWNLOAD_FOLDER, "is_dir" => is_dir(PUBLIC_DOWNLOAD_FOLDER), "is_writeable" => is_writable(PUBLIC_DOWNLOAD_FOLDER)));
         unset($this->actions["public_url"]);
         $actionXpath = new DOMXPath($contribNode->ownerDocument);
         $publicUrlNodeList = $actionXpath->query('action[@name="public_url"]', $contribNode);
         $publicUrlNode = $publicUrlNodeList->item(0);
         $contribNode->removeChild($publicUrlNode);
     }
     if ($this->detectStreamWrapper() !== false) {
         $this->actions["cross_copy"] = array();
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:15,代码来源:class.AbstractAccessDriver.php

示例15: parseSpecificContributions

 protected function parseSpecificContributions(&$contribNode)
 {
     parent::parseSpecificContributions($contribNode);
     if (isset($this->actions["public_url"])) {
         $disableSharing = false;
         if (!is_dir(PUBLIC_DOWNLOAD_FOLDER) || !is_writable(PUBLIC_DOWNLOAD_FOLDER)) {
             AJXP_Logger::logAction("Disabling Public links, PUBLIC_DOWNLOAD_FOLDER is not writeable!", array("folder" => PUBLIC_DOWNLOAD_FOLDER, "is_dir" => is_dir(PUBLIC_DOWNLOAD_FOLDER), "is_writeable" => is_writable(PUBLIC_DOWNLOAD_FOLDER)));
             $disableSharing = true;
         } else {
             if (AuthService::usersEnabled()) {
                 $loggedUser = AuthService::getLoggedUser();
                 /*
                 // Should be disabled by AJXP_Controller directly
                 $currentRepo = ConfService::getRepository();
                 if($currentRepo != null){
                 	$rights = $loggedUser->getSpecificActionsRights($currentRepo->getId());
                 	if(isSet($rights["public_url"]) && $rights["public_url"] === false){
                 		$disableSharing = true;
                 	}
                 }
                 */
                 if ($loggedUser->getId() == "guest" || $loggedUser == "shared") {
                     $disableSharing = true;
                 }
             } else {
                 $disableSharing = true;
             }
         }
         if ($disableSharing) {
             unset($this->actions["public_url"]);
             $actionXpath = new DOMXPath($contribNode->ownerDocument);
             $publicUrlNodeList = $actionXpath->query('action[@name="public_url"]', $contribNode);
             $publicUrlNode = $publicUrlNodeList->item(0);
             $contribNode->removeChild($publicUrlNode);
         }
     }
     if ($this->detectStreamWrapper() !== false) {
         $this->actions["cross_copy"] = array();
     }
 }
开发者ID:pussbb,项目名称:CI_DEV_CMS,代码行数:40,代码来源:class.AbstractAccessDriver.php


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