summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-01 16:12:49 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:30 +0200
commitde4ec21c3948f86685450269a1857473babc4a56 (patch)
treed405b292a66ea405f01daae08479fa61ae0b7127 /apps/files_sharing
parentfeb9a6e21630724f3388ea219daccca3b13f69d0 (diff)
downloadnextcloud-server-de4ec21c3948f86685450269a1857473babc4a56.tar.gz
nextcloud-server-de4ec21c3948f86685450269a1857473babc4a56.zip
work arround to make sure that shares are initialized only once
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index ce8665c97a0..27be977fd1d 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -39,6 +39,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
private $share; // the shared resource
private $files = array();
+ private static $isInitialized = false;
public function __construct($arguments) {
$this->share = $arguments['share'];
@@ -426,8 +427,12 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
$shares = \OCP\Share::getItemsSharedWithUser('file', $options['user']);
$manager = Filesystem::getMountManager();
$loader = Filesystem::getLoader();
- if (!\OCP\User::isLoggedIn() || \OCP\User::getUser() != $options['user']
- || $shares
+ if (
+ !self::$isInitialized && (
+ !\OCP\User::isLoggedIn()
+ || \OCP\User::getUser() != $options['user']
+ || $shares
+ )
) {
foreach ($shares as $share) {
// don't mount shares where we have no permissions
@@ -445,6 +450,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
}
}
+ self::$isInitialized = true;
}
/**