From 050f9769bc7d66e5b86bac2281810c0216328be3 Mon Sep 17 00:00:00 2001 From: nao-pon Date: Thu, 19 Apr 2012 23:14:11 +0900 Subject: [PATCH] fix attr() attr($path, $name, $val) - $val was not effective. --- php/elFinderVolumeDriver.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/php/elFinderVolumeDriver.class.php b/php/elFinderVolumeDriver.class.php index a1de1ea36..96d673f40 100644 --- a/php/elFinderVolumeDriver.class.php +++ b/php/elFinderVolumeDriver.class.php @@ -1900,7 +1900,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; } @@ -1931,7 +1931,7 @@ abstract class elFinderVolumeDriver { } } - return $perm === null ? $this->defaults[$name] : !!$perm; + return $perm === null ? (is_null($val)? $this->defaults[$name] : $val) : !!$perm; } /** @@ -1997,8 +1997,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']))) {