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

Commit

Permalink
Fix #404
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jan 6, 2014
1 parent 15f1af9 commit c11e5fb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions core/src/plugins/access.fs/class.fsAccessDriver.php
Expand Up @@ -589,19 +589,14 @@ public function switchAction($action, $httpVars, $fileVars)
//------------------------------------
case "chmod";

$messtmp="";
$files = $selection->getFiles();
$changedFiles = array();
$chmod_value = $httpVars["chmod_value"];
$recursive = $httpVars["recursive"];
$recur_apply_to = $httpVars["recur_apply_to"];
foreach ($files as $fileName) {
$error = $this->chmod($fileName, $chmod_value, ($recursive=="on"), ($recursive=="on"?$recur_apply_to:"both"), $changedFiles);
}
if (isSet($error)) {
throw new AJXP_Exception($error);
$this->chmod($fileName, $chmod_value, ($recursive=="on"), ($recursive=="on"?$recur_apply_to:"both"), $changedFiles);
}
//$messtmp.="$mess[34] ".SystemTextEncoding::toUTF8($filename)." $mess[39] ";
$logMessage="Successfully changed permission to ".$chmod_value." for ".count($changedFiles)." files or folders";
$this->logInfo("Chmod", array("dir"=>$this->addSlugToPath($dir), "filesCount"=>count($changedFiles)));
if(!isSet($nodesDiffs)) $nodesDiffs = $this->getNodesDiffArray();
Expand Down Expand Up @@ -1655,9 +1650,9 @@ public function isWriteable($dir, $type="dir")
* @param String $chmodValue
* @param Boolean $recursive
* @param String $nodeType "both", "file", "dir"
* @param $changedFiles
* @return void
*/

// $recursive=false, $nodeType="both"
public function chmod($path, $chmodValue, $recursive, $nodeType, &$changedFiles)
{
$realValue = octdec(ltrim($chmodValue, "0"));
Expand Down

0 comments on commit c11e5fb

Please sign in to comment.