diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-09-03 16:22:17 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-09-03 16:22:17 +0300 |
commit | be37ef7f7b979ef11d0fe0d3aaad8bf5f6fec9ef (patch) | |
tree | 61695d45cb2575a1d7ae2f007c45d3bf5dcc1ecf | |
parent | b70eaed7c5614da0a062c50c5c9d6a891a322122 (diff) |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | lib/Controller/ThemingController.php | 30 | ||||
-rw-r--r-- | lib/Settings/Admin.php | 8 |
2 files changed, 3 insertions, 35 deletions
diff --git a/lib/Controller/ThemingController.php b/lib/Controller/ThemingController.php index b62bd5d..67b0185 100644 --- a/lib/Controller/ThemingController.php +++ b/lib/Controller/ThemingController.php @@ -23,56 +23,31 @@ namespace OCA\ThemingCustomCss\Controller; -use OC\Template\SCSSCacher; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataDisplayResponse; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Utility\ITimeFactory; -use OCP\Files\IAppData; use OCP\IConfig; -use OCP\IL10N; use OCP\IRequest; class ThemingController extends Controller { + /** @var ITimeFactory */ private $timeFactory; - /** @var IL10N */ - private $l10n; /** @var IConfig */ private $config; - /** @var IAppData */ - private $appData; - /** @var SCSSCacher */ - private $scssCacher; - /** - * ThemingController constructor. - * - * @param string $appName - * @param IRequest $request - * @param IConfig $config - * @param ITimeFactory $timeFactory - * @param IL10N $l - * @param IAppData $appData - * @param SCSSCacher $scssCacher - */ public function __construct( $appName, IRequest $request, IConfig $config, - ITimeFactory $timeFactory, - IL10N $l, - IAppData $appData, - SCSSCacher $scssCacher + ITimeFactory $timeFactory ) { parent::__construct($appName, $request); $this->timeFactory = $timeFactory; - $this->l10n = $l; $this->config = $config; - $this->appData = $appData; - $this->scssCacher = $scssCacher; } /** @@ -82,7 +57,6 @@ class ThemingController extends Controller { * @return DataDisplayResponse|NotFoundResponse */ public function getStylesheet() { - // TODO: compile SCSS and cache that as a file $customCss = $this->config->getAppValue('theming_customcss', 'customcss', ''); $response = new DataDisplayResponse($customCss, Http::STATUS_OK, ['Content-Type' => 'text/css']); $response->cacheFor(86400); diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 21d2c24..009068c 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -40,14 +40,8 @@ class Admin implements ISettings { /** @var IURLGenerator */ private $urlGenerator; - public function __construct(IConfig $config, - IL10N $l, - ThemingDefaults $themingDefaults, - IURLGenerator $urlGenerator) { + public function __construct(IConfig $config) { $this->config = $config; - $this->l = $l; - $this->themingDefaults = $themingDefaults; - $this->urlGenerator = $urlGenerator; } /** |