From 26d950486ba5e48dd5ba44a4924760c88ed6c7ac Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 29 Sep 2014 21:22:34 +0200 Subject: add default locale and developer names and move the method to the pagecontroller, @cosenal --- appinfo/application.php | 18 +++++++----------- appinfo/routes.php | 4 +--- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'appinfo') diff --git a/appinfo/application.php b/appinfo/application.php index d80498a4a..f8c2bc7fa 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -29,7 +29,6 @@ use \OCA\News\Controller\UtilityApiController; use \OCA\News\Controller\FolderApiController; use \OCA\News\Controller\FeedApiController; use \OCA\News\Controller\ItemApiController; -use \OCA\News\Controller\AppController; use \OCA\News\Service\FolderService; use \OCA\News\Service\FeedService; @@ -79,6 +78,8 @@ class Application extends App { $c->query('AppName'), $c->query('Request'), $c->query('CoreConfig'), + $c->query('URLGenerator'), + $c->query('AppConfig'), $c->query('L10N'), $c->query('UserId') ); @@ -170,15 +171,6 @@ class Application extends App { ); }); - $container->registerService('AppController', function($c) { - return new AppController( - $c->query('AppName'), - $c->query('Request'), - $c->query('ServerContainer')->getURLGenerator(), - $c->query('AppConfig') - ); - }); - /** * Business Layer */ @@ -271,7 +263,7 @@ class Application extends App { $config = new AppConfig( $c->query('ServerContainer')->getNavigationManager(), $c->query('L10N'), - $c->query('ServerContainer')->getURLGenerator(), + $c->query('URLGenerator'), phpversion(), implode('.', Util::getVersion()), $extensions, @@ -290,6 +282,10 @@ class Application extends App { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); + $container->registerService('URLGenerator', function($c) { + return $c->query('ServerContainer')->getURLGenerator(); + }); + $container->registerService('UserId', function() { return User::getUser(); }); diff --git a/appinfo/routes.php b/appinfo/routes.php index 3e2ac189f..7703de1c7 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -21,9 +21,7 @@ $application->registerRoutes($this, ['routes' => [ ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], ['name' => 'page#settings', 'url' => '/settings', 'verb' => 'GET'], ['name' => 'page#update_settings', 'url' => '/settings', 'verb' => 'PUT'], - - // web app manifest - ['name' => 'app#manifest', 'url' => '/manifest.webapp', 'verb' => 'GET'], + ['name' => 'page#manifest', 'url' => '/manifest.webapp', 'verb' => 'GET'], // folders ['name' => 'folder#index', 'url' => '/folders', 'verb' => 'GET'], -- cgit v1.2.3