summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-02 12:02:32 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:30 +0200
commit60d8a39f03aef3a2b555505396ccd5716ad85eb1 (patch)
tree310599e59c3c8f40da21d901fb0ed5f573c30601
parent8b1a12a224e95936d1136368c265043ccc7c3071 (diff)
downloadnextcloud-server-60d8a39f03aef3a2b555505396ccd5716ad85eb1.tar.gz
nextcloud-server-60d8a39f03aef3a2b555505396ccd5716ad85eb1.zip
store init status per user
-rw-r--r--apps/files_sharing/lib/sharedstorage.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 27be977fd1d..6e3abb1f56c 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -39,7 +39,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
private $share; // the shared resource
private $files = array();
- private static $isInitialized = false;
+ private static $isInitialized = array();
public function __construct($arguments) {
$this->share = $arguments['share'];
@@ -424,11 +424,12 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
public static function setup($options) {
- $shares = \OCP\Share::getItemsSharedWithUser('file', $options['user']);
+ $user = $options['user'];
+ $shares = \OCP\Share::getItemsSharedWithUser('file', $user);
$manager = Filesystem::getMountManager();
$loader = Filesystem::getLoader();
if (
- !self::$isInitialized && (
+ !isset(self::$isInitialized[$user]) && (
!\OCP\User::isLoggedIn()
|| \OCP\User::getUser() != $options['user']
|| $shares
@@ -442,7 +443,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
$options['user_dir'] . '/' . $share['file_target'],
array(
'share' => $share,
- 'user' => $options['user']
+ 'user' => $user
),
$loader
);
@@ -450,7 +451,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
}
}
- self::$isInitialized = true;
+ self::$isInitialized[$user] = true;
}
/**