private $share; // the shared resource
private $files = array();
- private static $isInitialized = false;
+ private static $isInitialized = array();
public function __construct($arguments) {
$this->share = $arguments['share'];
}
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
$options['user_dir'] . '/' . $share['file_target'],
array(
'share' => $share,
- 'user' => $options['user']
+ 'user' => $user
),
$loader
);
}
}
}
- self::$isInitialized = true;
+ self::$isInitialized[$user] = true;
}
/**