diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-10-11 09:33:09 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-10-11 09:33:09 +0300 |
commit | 543190f8b3228b994ba897c9a43fdc3f61adf663 (patch) | |
tree | 650022215976952462cef64f59c25e86fa20a006 /apps/encryption/appinfo | |
parent | f6a79338d4ea66f9c341d004951b606b5310b478 (diff) |
Do not create Application instances directly
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/encryption/appinfo')
-rw-r--r-- | apps/encryption/appinfo/app.php | 3 | ||||
-rw-r--r-- | apps/encryption/appinfo/routes.php | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/encryption/appinfo/app.php b/apps/encryption/appinfo/app.php index a39464e21f8..97d7e8f7488 100644 --- a/apps/encryption/appinfo/app.php +++ b/apps/encryption/appinfo/app.php @@ -28,7 +28,8 @@ namespace OCA\Encryption\AppInfo; $encryptionSystemReady = \OC::$server->getEncryptionManager()->isReady(); -$app = new Application(); +/** @var Application $app */ +$app = \OC::$server->query(Application::class); if ($encryptionSystemReady) { $app->registerEncryptionModule(); $app->registerHooks(); diff --git a/apps/encryption/appinfo/routes.php b/apps/encryption/appinfo/routes.php index 22f3af7fbfb..4c01dd57ad3 100644 --- a/apps/encryption/appinfo/routes.php +++ b/apps/encryption/appinfo/routes.php @@ -24,7 +24,9 @@ namespace OCA\Encryption\AppInfo; -(new Application())->registerRoutes($this, array('routes' => array( +/** @var Application $app */ +$app = \OC::$server->query(Application::class); +$app->registerRoutes($this, array('routes' => array( [ 'name' => 'Recovery#adminRecovery', |