summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-10-23 23:20:50 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-10-24 15:52:00 +0200
commit99934134dc53baaee56740de669c7df549317a2f (patch)
tree94f970256afdb6ae4b2f383f46b0d463d324b022 /settings/Controller
parentdb1096bcfdf2336ccf6aefb70dd902a63ed615db (diff)
downloadnextcloud-server-99934134dc53baaee56740de669c7df549317a2f.tar.gz
nextcloud-server-99934134dc53baaee56740de669c7df549317a2f.zip
Use DI for IAppManager to encryption migration
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/EncryptionController.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/settings/Controller/EncryptionController.php b/settings/Controller/EncryptionController.php
index 0c8dd529a7d..4ec6177f28f 100644
--- a/settings/Controller/EncryptionController.php
+++ b/settings/Controller/EncryptionController.php
@@ -26,6 +26,7 @@ namespace OC\Settings\Controller;
use OC\Files\View;
use OCA\Encryption\Migration;
+use OCP\App\IAppManager;
use OCP\IDBConnection;
use OCP\IL10N;
use OCP\AppFramework\Controller;
@@ -57,6 +58,9 @@ class EncryptionController extends Controller {
/** @var ILogger */
private $logger;
+ /** @var IAppManager */
+ private $appManager;
+
/**
* @param string $appName
* @param IRequest $request
@@ -66,6 +70,7 @@ class EncryptionController extends Controller {
* @param IUserManager $userManager
* @param View $view
* @param ILogger $logger
+ * @param IAppManager $appManager
*/
public function __construct($appName,
IRequest $request,
@@ -74,7 +79,8 @@ class EncryptionController extends Controller {
IDBConnection $connection,
IUserManager $userManager,
View $view,
- ILogger $logger) {
+ ILogger $logger,
+ IAppManager $appManager) {
parent::__construct($appName, $request);
$this->l10n = $l10n;
$this->config = $config;
@@ -82,6 +88,7 @@ class EncryptionController extends Controller {
$this->view = $view;
$this->userManager = $userManager;
$this->logger = $logger;
+ $this->appManager = $appManager;
}
/**
@@ -89,13 +96,15 @@ class EncryptionController extends Controller {
* @param View $view
* @param IDBConnection $connection
* @param ILogger $logger
+ * @param IAppManager $appManager
* @return Migration
*/
protected function getMigration(IConfig $config,
View $view,
IDBConnection $connection,
- ILogger $logger) {
- return new Migration($config, $view, $connection, $logger);
+ ILogger $logger,
+ IAppManager $appManager) {
+ return new Migration($config, $view, $connection, $logger, $appManager);
}
/**
@@ -111,7 +120,7 @@ class EncryptionController extends Controller {
try {
- $migration = $this->getMigration($this->config, $this->view, $this->connection, $this->logger);
+ $migration = $this->getMigration($this->config, $this->view, $this->connection, $this->logger, $this->appManager);
$migration->reorganizeSystemFolderStructure();
$migration->updateDB();