summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-02 20:39:20 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-02 20:39:20 +0200
commit916f85937785f6580f201cdf95fb42f63457af94 (patch)
tree852e6aa67185ef7bb0342d30feeb176b03ea52a5 /apps
parent2a10e78c581d441ec0c15eeca30e4646b854ab2c (diff)
downloadnextcloud-server-916f85937785f6580f201cdf95fb42f63457af94.tar.gz
nextcloud-server-916f85937785f6580f201cdf95fb42f63457af94.zip
check if it is a share storage
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/permissions.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/permissions.php b/apps/files_sharing/lib/permissions.php
index ca694d98ade..2c4dce36332 100644
--- a/apps/files_sharing/lib/permissions.php
+++ b/apps/files_sharing/lib/permissions.php
@@ -79,7 +79,11 @@ class Shared_Permissions extends Permissions {
*/
public function getDirectoryPermissions($parentId, $user) {
- $fileCacheId = ($parentId === -1) ? $this->storage->getSourceId() : $parentId;
+ if ($parentId === -1 && $this->storage->instanceOfStorage('\OC\Files\Storage\Shared')) {
+ $fileCacheId = $this->storage->getSourceId();
+ } else {
+ $fileCacheId = $parentId;
+ }
$query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `parent` = ?');
$result = $query->execute(array($fileCacheId));