diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-27 11:10:06 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-27 21:00:02 +0200 |
commit | 68db3059eec904e90c41a8452799222e21c9c460 (patch) | |
tree | c4ab392d196eb3103016bd2f1469d99ee4372e07 /apps/encryption/appinfo | |
parent | 5549641f1f977ab2b105b8f9d7b8c6829c0e6d02 (diff) | |
download | nextcloud-server-68db3059eec904e90c41a8452799222e21c9c460.tar.gz nextcloud-server-68db3059eec904e90c41a8452799222e21c9c460.zip |
detect migration status
Diffstat (limited to 'apps/encryption/appinfo')
-rw-r--r-- | apps/encryption/appinfo/app.php | 6 | ||||
-rw-r--r-- | apps/encryption/appinfo/application.php | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/apps/encryption/appinfo/app.php b/apps/encryption/appinfo/app.php index 0c7c231aef7..2eb12f638ed 100644 --- a/apps/encryption/appinfo/app.php +++ b/apps/encryption/appinfo/app.php @@ -25,8 +25,10 @@ namespace OCA\Encryption\AppInfo; \OCP\Util::addscript('encryption', 'encryption'); -$app = new Application(); -if (\OC::$server->getEncryptionManager()->isReady()) { +$encryptionSystemReady = \OC::$server->getEncryptionManager()->isReady(); + +$app = new Application([], $encryptionSystemReady); +if ($encryptionSystemReady) { $app->registerEncryptionModule(); $app->registerHooks(); $app->registerSettings(); diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php index 10ad610cd4a..cb9c33cfe58 100644 --- a/apps/encryption/appinfo/application.php +++ b/apps/encryption/appinfo/application.php @@ -52,12 +52,18 @@ class Application extends \OCP\AppFramework\App { /** * @param array $urlParams + * @param bool $encryptionSystemReady */ - public function __construct($urlParams = array()) { + public function __construct($urlParams = array(), $encryptionSystemReady = true) { parent::__construct('encryption', $urlParams); $this->encryptionManager = \OC::$server->getEncryptionManager(); $this->config = \OC::$server->getConfig(); $this->registerServices(); + if($encryptionSystemReady === false) { + /** @var Session $session */ + $session = $this->getContainer()->query('Session'); + $session->setStatus(Session::RUN_MIGRATION); + } } /** |