aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-12-30 14:42:12 +0100
committerRobin Appelman <icewind@owncloud.com>2015-12-30 14:42:22 +0100
commit45d03964049d6fb42fde416e193d5cc9d9ed480e (patch)
treed5dc9c7193a56e7d160371da0a06405701bb24bc /lib
parent9c4ab517353d950627f7e36d983728f0deeccde7 (diff)
downloadnextcloud-server-45d03964049d6fb42fde416e193d5cc9d9ed480e.tar.gz
nextcloud-server-45d03964049d6fb42fde416e193d5cc9d9ed480e.zip
Cache sharing disabled in the view
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/view.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index fcea4828c49..c47dc2f277e 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -1339,11 +1339,12 @@ class View {
$folderId = $data['fileid'];
$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
+ $sharingDisabled = \OCP\Util::isSharingDisabledForUser();
/**
* @var \OC\Files\FileInfo[] $files
*/
- $files = array_map(function (array $content) use ($path, $storage, $mount) {
- if (\OCP\Util::isSharingDisabledForUser()) {
+ $files = array_map(function (array $content) use ($path, $storage, $mount, $sharingDisabled) {
+ if ($sharingDisabled) {
$content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE;
}
$owner = $this->getUserObjectForOwner($storage->getOwner($content['path']));