diff options
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); + } } /** |