summaryrefslogtreecommitdiffstats
path: root/apps/files_external/appinfo
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/appinfo')
-rw-r--r--apps/files_external/appinfo/app.php8
-rw-r--r--apps/files_external/appinfo/routes.php3
2 files changed, 4 insertions, 7 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php
index 37a489535ea..6c659af8aac 100644
--- a/apps/files_external/appinfo/app.php
+++ b/apps/files_external/appinfo/app.php
@@ -47,8 +47,9 @@ OC::$CLASSPATH['OCA\Files\External\Api'] = 'files_external/lib/api.php';
require_once __DIR__ . '/../3rdparty/autoload.php';
-$app = new \OCA\Files_external\Appinfo\Application();
-$appContainer = $app->getContainer();
+// register Application object singleton
+\OC_Mount_Config::$app = new \OCA\Files_external\Appinfo\Application();
+$appContainer = \OC_Mount_Config::$app->getContainer();
$l = \OC::$server->getL10N('files_external');
@@ -65,9 +66,6 @@ if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == '
"name" => $l->t('External storage')
]);
-// Teach OC_Mount_Config about the AppFramework
-\OC_Mount_Config::initApp($appContainer);
-
// connecting hooks
OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OC_Mount_Config', 'initMountPointsHook');
OCP\Util::connectHook('OC_User', 'post_login', 'OC\Files\Storage\SMB_OC', 'login');
diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php
index bc4b0e98c91..213e7b28dc1 100644
--- a/apps/files_external/appinfo/routes.php
+++ b/apps/files_external/appinfo/routes.php
@@ -28,8 +28,7 @@ namespace OCA\Files_External\AppInfo;
/**
* @var $this \OC\Route\Router
**/
-$application = new Application();
-$application->registerRoutes(
+\OC_Mount_Config::$app->registerRoutes(
$this,
array(
'resources' => array(