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

Commit

Permalink
Fix typo in ENABLE_FOLDER_SHARING value testing
Browse files Browse the repository at this point in the history
Fix check for USER_SHARED_USERS_LIMIT on mergedRole instead of personalRole
  • Loading branch information
cdujeu committed Dec 1, 2015
1 parent 8eb41d8 commit 3075ee1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions core/src/plugins/access.fs/class.fsAccessDriver.php
Expand Up @@ -49,9 +49,9 @@ public function initRepository()
} else {
$this->driverConf = array();
}
if ( $this->getFilteredOption("PROBE_REAL_SIZE", $this->repository->getId()) == true ) {
if ( $this->getFilteredOption("PROBE_REAL_SIZE", $this->repository) == true ) {
// PASS IT TO THE WRAPPER
ConfService::setConf("PROBE_REAL_SIZE", $this->getFilteredOption("PROBE_REAL_SIZE", $this->repository->getId()));
ConfService::setConf("PROBE_REAL_SIZE", $this->getFilteredOption("PROBE_REAL_SIZE", $this->repository));
}
$create = $this->repository->getOption("CREATE");
$path = SystemTextEncoding::toStorageEncoding($this->repository->getOption("PATH"));
Expand Down Expand Up @@ -288,8 +288,8 @@ public function switchAction($action, $httpVars, $fileVars)
$file = AJXP_Utils::getAjxpTmpDir()."/".($loggedUser?$loggedUser->getId():"shared")."_".time()."tmpDownload.zip";
$zipFile = $this->makeZip($selection->getFiles(), $file, empty($dir)?"/":$dir);
if(!$zipFile) throw new AJXP_Exception("Error while compressing");
if(!$this->getFilteredOption("USE_XSENDFILE", $this->repository->getId())
&& !$this->getFilteredOption("USE_XACCELREDIRECT", $this->repository->getId())){
if(!$this->getFilteredOption("USE_XSENDFILE", $this->repository)
&& !$this->getFilteredOption("USE_XACCELREDIRECT", $this->repository)){
register_shutdown_function("unlink", $file);
}
$localName = ($base==""?"Files":$base).".zip";
Expand Down Expand Up @@ -516,7 +516,7 @@ public function switchAction($action, $httpVars, $fileVars)
$nodesDiffs["ADD"][] = $newNode;
if($action == "move") $nodesDiffs["REMOVE"][] = $selectedPath;
}
if (!(RecycleBinManager::getRelativeRecycle() ==$dest && $this->getFilteredOption("HIDE_RECYCLE", $this->repository->getId()) == true)) {
if (!(RecycleBinManager::getRelativeRecycle() ==$dest && $this->getFilteredOption("HIDE_RECYCLE", $this->repository) == true)) {
//$reloadDataNode = $dest;
}

Expand Down Expand Up @@ -1094,7 +1094,7 @@ public function switchAction($action, $httpVars, $fileVars)
array_map(array("AJXP_XMLWriter", "renderAjxpNode"), $fullList["f"]);

// ADD RECYCLE BIN TO THE LIST
if ($dir == "" && RecycleBinManager::recycleEnabled() && $this->getFilteredOption("HIDE_RECYCLE", $this->repository->getId()) !== true) {
if ($dir == "" && RecycleBinManager::recycleEnabled() && $this->getFilteredOption("HIDE_RECYCLE", $this->repository) !== true) {
$recycleBinOption = RecycleBinManager::getRelativeRecycle();
if (file_exists($this->urlBase.$recycleBinOption)) {
$recycleNode = new AJXP_Node($this->urlBase.$recycleBinOption);
Expand Down Expand Up @@ -1458,7 +1458,7 @@ public function readFile($filePathOrData, $headerType="plain", $localName="", $d
if ($data) {
print($filePathOrData);
} else {
if ($this->getFilteredOption("USE_XSENDFILE", $this->repository->getId()) && AJXP_MetaStreamWrapper::actualRepositoryWrapperClass($this->repository->getId()) == "fsAccessWrapper") {
if ($this->getFilteredOption("USE_XSENDFILE", $this->repository) && AJXP_MetaStreamWrapper::actualRepositoryWrapperClass($this->repository->getId()) == "fsAccessWrapper") {
if(!$realfileSystem) $filePathOrData = fsAccessWrapper::getRealFSReference($filePathOrData);
$filePathOrData = str_replace("\\", "/", $filePathOrData);
$server_name = $_SERVER["SERVER_SOFTWARE"];
Expand Down Expand Up @@ -1537,7 +1537,7 @@ public function countFiles($dirName, $foldersOnly = false, $nonEmptyCheckOnly =
return count($dirs);
}
$count = 0;
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository);
while (strlen($file = readdir($handle)) > 0) {
if($file != "." && $file !=".."
&& !(AJXP_Utils::isHidden($file) && !$showHiddenFiles)){
Expand Down Expand Up @@ -1810,7 +1810,7 @@ public function simpleCopy($origFile, $destFile)

public function isWriteable($dir, $type="dir")
{
if ( $this->getFilteredOption("USE_POSIX", $this->repository->getId()) == true && extension_loaded('posix')) {
if ( $this->getFilteredOption("USE_POSIX", $this->repository) == true && extension_loaded('posix')) {
$real = AJXP_MetaStreamWrapper::getRealFSReference($dir);
return posix_access($real, POSIX_W_OK);
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.conf/class.AbstractConfDriver.php
Expand Up @@ -758,7 +758,7 @@ public function switchAction($action, $httpVars, $fileVars)
throw new Exception($mess["ajxp_conf.43"]);
}
$loggedUser = AuthService::getLoggedUser();
$limit = $loggedUser->personalRole->filterParameterValue("core.conf", "USER_SHARED_USERS_LIMIT", AJXP_REPO_SCOPE_ALL, "");
$limit = $loggedUser->mergedRole->filterParameterValue("core.conf", "USER_SHARED_USERS_LIMIT", AJXP_REPO_SCOPE_ALL, "");
if (!empty($limit) && intval($limit) > 0) {
$count = count($this->getUserChildren($loggedUser->getId()));
if ($count >= $limit) {
Expand Down

0 comments on commit 3075ee1

Please sign in to comment.