From 9dd64d120d6aaa94247cb52120bb80cccd420d17 Mon Sep 17 00:00:00 2001 From: VicDeo Date: Wed, 21 Sep 2016 19:51:51 +0300 Subject: Use classname with namespace to inject dependencies automatically (#26105) --- core/Application.php | 12 ------------ core/routes.php | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/core/Application.php b/core/Application.php index 8ea2672e54e..705202d5857 100644 --- a/core/Application.php +++ b/core/Application.php @@ -126,18 +126,6 @@ class Application extends App { $c->query('SecureRandom') ); }); - $container->registerService('OccController', function(SimpleContainer $c) { - return new OccController( - $c->query('AppName'), - $c->query('Request'), - $c->query('Config'), - new \OC\Console\Application( - $c->query('Config'), - $c->query('ServerContainer')->getEventDispatcher(), - $c->query('Request') - ) - ); - }); /** * Core class wrappers diff --git a/core/routes.php b/core/routes.php index c473408e2e9..0199fe360b9 100644 --- a/core/routes.php +++ b/core/routes.php @@ -48,7 +48,7 @@ $application->registerRoutes($this, [ ['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'], ['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'], ['name' => 'token#generateToken', 'url' => '/token/generate', 'verb' => 'POST'], - ['name' => 'occ#execute', 'url' => '/occ/{command}', 'verb' => 'POST'], + ['name' => 'OC\Core\Controller\Occ#execute', 'url' => '/occ/{command}', 'verb' => 'POST'], ['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'], ['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'], ['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'], -- cgit v1.2.3