diff --git a/api/src/Link.php b/api/src/Link.php index 8f4a39cedb..632ee5d629 100644 --- a/api/src/Link.php +++ b/api/src/Link.php @@ -1798,10 +1798,7 @@ class Link extends Link\Storage { $cache |= $ret ? $required|Acl::READ : 0; } - else - { - $ret = $ret ? $required|Acl::READ : 0; - } + $ret = $ret ? $required|Acl::READ : 0; } else { diff --git a/api/src/Vfs.php b/api/src/Vfs.php index deda97ed11..20e3d0f898 100644 --- a/api/src/Vfs.php +++ b/api/src/Vfs.php @@ -2017,7 +2017,7 @@ class Vfs extends Vfs\Base if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !is_uploaded_file()"); return false; } - if (!(self::is_writable($target) || ($dir = self::dirname($target)) && self::is_writable($dir))) + if (!self::is_writable($target) && !(($dir = self::dirname($target)) && self::is_writable($dir))) { if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !writable"); return false; diff --git a/api/src/Vfs/Links/StreamWrapper.php b/api/src/Vfs/Links/StreamWrapper.php index ad794789eb..d4ba5f75ce 100644 --- a/api/src/Vfs/Links/StreamWrapper.php +++ b/api/src/Vfs/Links/StreamWrapper.php @@ -113,7 +113,7 @@ class StreamWrapper extends LinksParent // vfs & stream-wrapper use posix rights, Api\Link::file_access uses Api\Acl::{EDIT|READ}! $required = $check & Vfs::WRITABLE ? Api\Acl::EDIT : Api\Acl::READ; $access = Api\Link::file_access($app, $id, $required, $rel_path, $this->user); - $what = "from Api\Link::file_access('$app', $id, $required, '$rel_path,".$this->user.")"; + $what = "from Api\Link::file_access('$app', $id, $required, '$rel_path', ".$this->user.")"; } if (self::DEBUG) error_log(__METHOD__."($url,$check) user=".Vfs::$user." ($what) ".($access?"access granted ($app:$id:$rel_path)":'no access!!!')); return $access; @@ -453,4 +453,4 @@ class StreamWrapper extends LinksParent } } -StreamWrapper::register(); +StreamWrapper::register(); \ No newline at end of file diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 868d68c177..8301f5acd6 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -1569,7 +1569,7 @@ class infolog_bo { Link::set_cache('infolog',$info['info_id'], $this->link_title($info), - $this->file_access($info,Acl::EDIT) ? EGW_ACL_READ|EGW_ACL_EDIT : + $this->file_access($info,Acl::EDIT) ? Acl::READ|Acl::EDIT : ($this->file_access($info,Acl::READ) ? Acl::READ : 0)); }