diff --git a/php/elFinderVolumeDriver.class.php b/php/elFinderVolumeDriver.class.php index 427d7f66a..598800f7c 100644 --- a/php/elFinderVolumeDriver.class.php +++ b/php/elFinderVolumeDriver.class.php @@ -1963,7 +1963,7 @@ abstract class elFinderVolumeDriver { * @return bool * @author Dmitry (dio) Levashov **/ - protected function attr($path, $name, $val=false) { + protected function attr($path, $name, $val=null) { if (!isset($this->defaults[$name])) { return false; } @@ -1994,7 +1994,7 @@ abstract class elFinderVolumeDriver { } } - return $perm === null ? $this->defaults[$name] : !!$perm; + return $perm === null ? (is_null($val)? $this->defaults[$name] : $val) : !!$perm; } /** @@ -2060,8 +2060,8 @@ abstract class elFinderVolumeDriver { $stat['size'] = 'unknown'; } - $stat['read'] = intval($this->attr($path, 'read', isset($stat['read']) ? !!$stat['read'] : false)); - $stat['write'] = intval($this->attr($path, 'write', isset($stat['write']) ? !!$stat['write'] : false)); + $stat['read'] = intval($this->attr($path, 'read', isset($stat['read']) ? !!$stat['read'] : null)); + $stat['write'] = intval($this->attr($path, 'write', isset($stat['write']) ? !!$stat['write'] : null)); if ($root) { $stat['locked'] = 1; } elseif ($this->attr($path, 'locked', !empty($stat['locked']))) {