aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-10 09:42:40 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-10 09:42:40 +0200
commitd418ea550ba3e15b4ce1dbe1d0491c158f988b38 (patch)
tree449edc68b369a15f5c455eb5108235631feb8fce /core
parent9c8fe8200019c0e6345cd8e73bb2d81742781839 (diff)
downloadnextcloud-server-d418ea550ba3e15b4ce1dbe1d0491c158f988b38.tar.gz
nextcloud-server-d418ea550ba3e15b4ce1dbe1d0491c158f988b38.zip
Automatic injection for CssController
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r--core/Application.php11
-rw-r--r--core/Controller/CssController.php7
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;
}