From 543190f8b3228b994ba897c9a43fdc3f61adf663 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 11 Oct 2019 08:33:09 +0200 Subject: Do not create Application instances directly Signed-off-by: Christoph Wurst --- apps/encryption/appinfo/app.php | 3 ++- apps/encryption/appinfo/routes.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/encryption') 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', -- cgit v1.2.3