summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-11-02 13:13:06 +0100
committerVincent Petry <pvince81@owncloud.com>2015-12-04 13:48:21 +0100
commita1898dc2bf9a89def29c1437903e560609f0cf40 (patch)
tree527d941bd240dd1c02760819724d21dfdd5d041c /apps/files_external/lib
parent98bb8372f7f0ab1f669cdd92d439814e1b6aaa1a (diff)
downloadnextcloud-server-a1898dc2bf9a89def29c1437903e560609f0cf40.tar.gz
nextcloud-server-a1898dc2bf9a89def29c1437903e560609f0cf40.zip
db config backend for files_external
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/config/configadapter.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php
index f9640d53377..4e37e6a4004 100644
--- a/apps/files_external/lib/config/configadapter.php
+++ b/apps/files_external/lib/config/configadapter.php
@@ -23,6 +23,7 @@
namespace OCA\Files_External\Config;
+use OCA\Files_external\Migration\StorageMigrator;
use OCP\Files\Storage;
use OC\Files\Mount\MountPoint;
use OCP\Files\Storage\IStorageFactory;
@@ -44,17 +45,22 @@ class ConfigAdapter implements IMountProvider {
/** @var UserGlobalStoragesService */
private $userGlobalStoragesService;
+ /** @var StorageMigrator */
+ private $migrator;
/**
* @param UserStoragesService $userStoragesService
* @param UserGlobalStoragesService $userGlobalStoragesService
+ * @param StorageMigrator $migrator
*/
public function __construct(
UserStoragesService $userStoragesService,
- UserGlobalStoragesService $userGlobalStoragesService
+ UserGlobalStoragesService $userGlobalStoragesService,
+ StorageMigrator $migrator
) {
$this->userStoragesService = $userStoragesService;
$this->userGlobalStoragesService = $userGlobalStoragesService;
+ $this->migrator = $migrator;
}
/**
@@ -108,6 +114,8 @@ class ConfigAdapter implements IMountProvider {
* @return \OCP\Files\Mount\IMountPoint[]
*/
public function getMountsForUser(IUser $user, IStorageFactory $loader) {
+ $this->migrator->migrateUser();
+
$mounts = [];
$this->userStoragesService->setUser($user);
@@ -124,7 +132,7 @@ class ConfigAdapter implements IMountProvider {
$mount = new MountPoint(
$impl,
- '/'.$user->getUID().'/files' . $storage->getMountPoint(),
+ '/' . $user->getUID() . '/files' . $storage->getMountPoint(),
null,
$loader,
$storage->getMountOptions()
@@ -145,7 +153,7 @@ class ConfigAdapter implements IMountProvider {
$this->userStoragesService,
$storage->getId(),
$impl,
- '/'.$user->getUID().'/files' . $storage->getMountPoint(),
+ '/' . $user->getUID() . '/files' . $storage->getMountPoint(),
null,
$loader,
$storage->getMountOptions()