diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-29 21:22:34 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-29 21:22:34 +0200 |
commit | 26d950486ba5e48dd5ba44a4924760c88ed6c7ac (patch) | |
tree | 1e4c039fc3250e9d049c93ab6b3cea462b00f5f9 /appinfo | |
parent | 45d7c475d3075f33017111fa8e8f952abedd7b46 (diff) |
add default locale and developer names and move the method to the pagecontroller, @cosenal
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/application.php | 18 | ||||
-rw-r--r-- | appinfo/routes.php | 4 |
2 files changed, 8 insertions, 14 deletions
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'], |