summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-10 08:49:40 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-10 08:49:40 +0100
commit3026cdbc809795099596d0fa8d934326ae81ac3e (patch)
tree33b1d930ebdd4c6529f624ed63da67bd8bb29807 /apps
parentea95bb01899cdac6bf55d29dfefd8148bb26893f (diff)
parentce10b93519a8f11affa906b526b508e790e5b4a7 (diff)
downloadnextcloud-server-3026cdbc809795099596d0fa8d934326ae81ac3e.tar.gz
nextcloud-server-3026cdbc809795099596d0fa8d934326ae81ac3e.zip
Merge pull request #12549 from owncloud/shared-cache-non-existing
Dont return cached date in shared cache when the file doesn't exist
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/cache.php22
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;
}