Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Update getFilteredOption signature
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Dec 1, 2015
1 parent 9d3c668 commit 3078a98
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions core/src/plugins/core.access/class.AbstractAccessDriver.php
Expand Up @@ -535,7 +535,7 @@ protected function resetAllPermission($value)
*/
public function filterUserSelectionToHidden($files)
{
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository);
foreach ($files as $file) {
$file = basename($file);
if (AJXP_Utils::isHidden($file) && !$showHiddenFiles) {
Expand All @@ -549,7 +549,7 @@ public function filterUserSelectionToHidden($files)

public function filterNodeName($nodePath, $nodeName, &$isLeaf, $lsOptions)
{
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository);
if($isLeaf === ""){
$isLeaf = (is_file($nodePath."/".$nodeName) || AJXP_Utils::isBrowsableArchive($nodeName));
}
Expand Down Expand Up @@ -583,11 +583,11 @@ public function filterFile($fileName, $hiddenTest = false)
{
$pathParts = pathinfo($fileName);
if($hiddenTest){
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository);
if (AJXP_Utils::isHidden($pathParts["basename"]) && !$showHiddenFiles) return true;
}
$hiddenFileNames = $this->getFilteredOption("HIDE_FILENAMES", $this->repository->getId());
$hiddenExtensions = $this->getFilteredOption("HIDE_EXTENSIONS", $this->repository->getId());
$hiddenFileNames = $this->getFilteredOption("HIDE_FILENAMES", $this->repository);
$hiddenExtensions = $this->getFilteredOption("HIDE_EXTENSIONS", $this->repository);
if (!empty($hiddenFileNames)) {
if (!is_array($hiddenFileNames)) {
$hiddenFileNames = explode(",",$hiddenFileNames);
Expand All @@ -609,7 +609,7 @@ public function filterFile($fileName, $hiddenTest = false)

public function filterFolder($folderName, $compare = "equals")
{
$hiddenFolders = $this->getFilteredOption("HIDE_FOLDERS", $this->repository->getId());
$hiddenFolders = $this->getFilteredOption("HIDE_FOLDERS", $this->repository);
if (!empty($hiddenFolders)) {
if (!is_array($hiddenFolders)) {
$hiddenFolders = explode(",",$hiddenFolders);
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.diaporama/class.ImagePreviewer.php
Expand Up @@ -50,7 +50,7 @@ public function switchAction($action, $httpVars, $filesVars)
return;
}
$this->logInfo('Preview', 'Preview content of '.$file, array("files" =>$selection->getUniqueFile()));
if (isSet($httpVars["get_thumb"]) && $httpVars["get_thumb"] == "true" && $this->getFilteredOption("GENERATE_THUMBNAIL", $repository->getId())) {
if (isSet($httpVars["get_thumb"]) && $httpVars["get_thumb"] == "true" && $this->getFilteredOption("GENERATE_THUMBNAIL", $repository)) {
$dimension = 200;
if(isSet($httpVars["dimension"]) && is_numeric($httpVars["dimension"])) $dimension = $httpVars["dimension"];
$this->currentDimension = $dimension;
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.imagick/class.IMagickPreviewer.php
Expand Up @@ -56,7 +56,7 @@ public function switchAction($action, $httpVars, $filesVars)
if (empty($convert)) {
return false;
}
$flyThreshold = 1024*1024*intval($this->getFilteredOption("ONTHEFLY_THRESHOLD", $repository->getId()));
$flyThreshold = 1024*1024*intval($this->getFilteredOption("ONTHEFLY_THRESHOLD", $repository));
$selection = new UserSelection($repository, $httpVars);
$destStreamURL = $selection->currentBaseUrl();

Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/editor.pixlr/class.PixlrEditor.php
Expand Up @@ -56,7 +56,7 @@ public function switchAction($action, $httpVars, $filesVars)


$saveTarget = $target."/fake_save_pixlr.php";
if ($this->getFilteredOption("CHECK_SECURITY_TOKEN", $repository->getId())) {
if ($this->getFilteredOption("CHECK_SECURITY_TOKEN", $repository)) {
$saveTarget = $target."/fake_save_pixlr_".md5($httpVars["secure_token"]).".php";
}
$params = array(
Expand Down Expand Up @@ -105,7 +105,7 @@ public function switchAction($action, $httpVars, $filesVars)
$url = $httpVars["new_url"];
$urlParts = parse_url($url);
$query = $urlParts["query"];
if ($this->getFilteredOption("CHECK_SECURITY_TOKEN", $repository->getId())) {
if ($this->getFilteredOption("CHECK_SECURITY_TOKEN", $repository)) {
$scriptName = basename($urlParts["path"]);
$token = str_replace(array("fake_save_pixlr_", ".php"), "", $scriptName);
if ($token != md5($httpVars["secure_token"])) {
Expand Down
10 changes: 5 additions & 5 deletions core/src/plugins/editor.zoho/class.ZohoEditor.php
Expand Up @@ -134,8 +134,8 @@ public function switchAction($action, $httpVars, $filesVars)
$_SESSION["ZOHO_CURRENT_EDITED"] = $destStreamURL.$file;
$_SESSION["ZOHO_CURRENT_UUID"] = md5(rand()."-".microtime());

if ($this->getFilteredOption("USE_ZOHO_AGENT", $repository->getId())) {
$saveUrl = $this->getFilteredOption("ZOHO_AGENT_URL", $repository->getId());
if ($this->getFilteredOption("USE_ZOHO_AGENT", $repository)) {
$saveUrl = $this->getFilteredOption("ZOHO_AGENT_URL", $repository);
} else {
$saveUrl = $target."/".AJXP_PLUGINS_FOLDER."/editor.zoho/agent/save_zoho.php";
}
Expand All @@ -144,7 +144,7 @@ public function switchAction($action, $httpVars, $filesVars)

$params = array(
'id' => $_SESSION["ZOHO_CURRENT_UUID"],
'apikey' => $this->getFilteredOption("ZOHO_API_KEY", $repository->getId()),
'apikey' => $this->getFilteredOption("ZOHO_API_KEY", $repository),
'output' => 'url',
'lang' => "en",
'filename' => urlencode(basename($file)),
Expand Down Expand Up @@ -206,8 +206,8 @@ public function switchAction($action, $httpVars, $filesVars)

$b64Sig = $this->signID($id);

if ($this->getFilteredOption("USE_ZOHO_AGENT",$repository->getId()) ) {
$url = $this->getFilteredOption("ZOHO_AGENT_URL",$repository->getId())."?ajxp_action=get_file&name=".$id."&ext=".$ext."&signature=".$b64Sig ;
if ($this->getFilteredOption("USE_ZOHO_AGENT",$repository) ) {
$url = $this->getFilteredOption("ZOHO_AGENT_URL",$repository)."?ajxp_action=get_file&name=".$id."&ext=".$ext."&signature=".$b64Sig ;
$data = AJXP_Utils::getRemoteContent($url);
if (strlen($data)) {
file_put_contents($targetFile, $data);
Expand Down

0 comments on commit 3078a98

Please sign in to comment.