diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-12-02 15:28:11 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-12-02 15:28:11 +0100 |
commit | ce10b93519a8f11affa906b526b508e790e5b4a7 (patch) | |
tree | 8b00c50b994280b67181ba31fc3ca9d579868304 | |
parent | e9029f94cb6eb9b37623ea1a2faf8aac11675900 (diff) | |
download | nextcloud-server-ce10b93519a8f11affa906b526b508e790e5b4a7.tar.gz nextcloud-server-ce10b93519a8f11affa906b526b508e790e5b4a7.zip |
Dont return cached date in shared cache when the file doesn't exist
-rw-r--r-- | apps/files_sharing/lib/cache.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index 270ed704bbd..e09b64cb039 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -89,16 +89,18 @@ class Shared_Cache extends Cache { $cache = $this->getSourceCache($file); if ($cache) { $data = $cache->get($this->files[$file]); - $data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom()); - $data['path'] = $file; - if ($file === '') { - $data['is_share_mount_point'] = true; - } - $data['uid_owner'] = $this->storage->getOwner($file); - if (isset($data['permissions'])) { - $data['permissions'] &= $this->storage->getPermissions($file); - } else { - $data['permissions'] = $this->storage->getPermissions($file); + if ($data) { + $data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom()); + $data['path'] = $file; + if ($file === '') { + $data['is_share_mount_point'] = true; + } + $data['uid_owner'] = $this->storage->getOwner($file); + if (isset($data['permissions'])) { + $data['permissions'] &= $this->storage->getPermissions($file); + } else { + $data['permissions'] = $this->storage->getPermissions($file); + } } return $data; } |