Permalink
Browse files

Remaining getOption() calls

  • Loading branch information...
1 parent 84b8424 commit 06f3f13475e3cc9f61ce7f8ece615eecaf64acae @cdujeu cdujeu committed Jun 7, 2016
@@ -449,8 +449,8 @@ public function switchRootDirInst($rootDirIndex=-1, $temporary=false)
if(isSet($this->configs["ACCESS_DRIVER"])) unset($this->configs["ACCESS_DRIVER"]);
}
- if (isSet($this->configs["REPOSITORY"]) && $this->configs["REPOSITORY"]->getOption("CHARSET")!="") {
- self::setContextCharset($this->configs["REPOSITORY"]->getOption("CHARSET"));
+ if (isSet($this->configs["REPOSITORY"]) && $this->configs["REPOSITORY"]->getSafeOption("CHARSET")!="") {
+ self::setContextCharset($this->configs["REPOSITORY"]->getSafeOption("CHARSET"));
} else {
self::clearContextCharset();
}
@@ -77,7 +77,7 @@ protected static function initPath($path, $streamType, $storeOpenContext = false
$pass = $safeCreds["password"];
$_SESSION["AJXP_SESSION_REMOTE_PASS"] = $pass;
$credentials = "$login:$pass@";
- $domain = $repoObject->getOption("DOMAIN");
+ $domain = $repoObject->getContextOption($node->getContext(), "DOMAIN");
if($domain != "") {
if((strcmp(substr($domain, -1), "/") === 0) || (strcmp(substr($domain, -1), "\\") === 0)){
$credentials = $domain.$credentials;
@@ -86,7 +86,7 @@ protected static function initPath($path, $streamType, $storeOpenContext = false
}
}
}
- $basePath = $repoObject->getOption("PATH");
+ $basePath = $repoObject->getContextOption($node->getContext(), "PATH");
$fullPath = "smbclient://".$credentials.$host."/";//.$basePath."/".$path;
if ($basePath!="") {
$fullPath.=trim($basePath, "/\\" );
@@ -518,7 +518,7 @@ protected function deldir($location, $repoData, $taskId = null)
public static function fixPermissions(AJXP_Node $node, &$stat, $remoteDetectionCallback = null)
{
$repoObject = $node->getRepository();
- $fixPermPolicy = $repoObject->getOption("FIX_PERMISSIONS");
+ $fixPermPolicy = $repoObject->getContextOption($node->getContext(), "FIX_PERMISSIONS");
$loggedUser = $node->getUser();
if ($loggedUser == null) {
return;
@@ -359,7 +359,7 @@ public function loadUserAlerts(\Psr\Http\Message\ServerRequestInterface $request
$nodeRepo = $node->getRepository();
if($nodeRepo != null && $nodeRepo->hasParent() && $nodeRepo->getParentId() == $repositoryFilter){
- $currentRoot = $nodeRepo->getOption("PATH");
+ $currentRoot = $nodeRepo->getContextOption($ctx, "PATH");
$contentFilter = $nodeRepo->getContentFilter();
if(isSet($contentFilter)){
$nodePath = $contentFilter->filterExternalPath($node->getPath());

0 comments on commit 06f3f13

Please sign in to comment.