diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Application.php | 11 | ||||
-rw-r--r-- | core/Controller/CssController.php | 7 |
2 files changed, 4 insertions, 14 deletions
diff --git a/core/Application.php b/core/Application.php index dad7546dcb8..5a2bc477fee 100644 --- a/core/Application.php +++ b/core/Application.php @@ -32,9 +32,6 @@ namespace OC\Core; use OC\Security\IdentityProof\Manager; use OCP\AppFramework\App; -use OC\Core\Controller\CssController; -use OCP\AppFramework\Utility\ITimeFactory; -use OCP\IRequest; use OCP\Util; /** @@ -58,13 +55,5 @@ class Application extends App { \OC::$server->getCrypto() ); }); - $container->registerService(CssController::class, function () use ($container) { - return new CssController( - $container->query('appName'), - $container->query(IRequest::class), - \OC::$server->getAppDataDir('css'), - $container->query(ITimeFactory::class) - ); - }); } } diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php index 57197e9999e..3cf477290fe 100644 --- a/core/Controller/CssController.php +++ b/core/Controller/CssController.php @@ -21,6 +21,7 @@ namespace OC\Core\Controller; +use OC\Files\AppData\Factory; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\NotFoundResponse; @@ -43,13 +44,13 @@ class CssController extends Controller { /** * @param string $appName * @param IRequest $request - * @param IAppData $appData + * @param Factory $appDataFactory * @param ITimeFactory $timeFactory */ - public function __construct($appName, IRequest $request, IAppData $appData, ITimeFactory $timeFactory) { + public function __construct($appName, IRequest $request, Factory $appDataFactory, ITimeFactory $timeFactory) { parent::__construct($appName, $request); - $this->appData = $appData; + $this->appData = $appDataFactory->get('css'); $this->timeFactory = $timeFactory; } |