check if it is a share storage

remotes/origin/ldap_group_count
Bjoern Schiessle 12 years ago
parent 2a10e78c58
commit 916f859377
  1. 6
      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));

Loading…
Cancel
Save