aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-07-11 09:09:09 +0200
committerGitHub <noreply@github.com>2018-07-11 09:09:09 +0200
commit029219a9e7778a95f4c627ec0bc24dae9c7881a2 (patch)
tree5f279b58f883c6a643f675aa60aede92ac6f584e /apps/theming
parent0e0dd2a90baf37cc5280611ba54a2f24e530a937 (diff)
parent805f50381472849334a3ad95df68ef8ba49f753f (diff)
downloadnextcloud-server-029219a9e7778a95f4c627ec0bc24dae9c7881a2.tar.gz
nextcloud-server-029219a9e7778a95f4c627ec0bc24dae9c7881a2.zip
Merge pull request #10177 from nextcloud/bugfix/noid/theming-load-with-custom-theme
Load theming app css as well if legacy theme is enabled
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/appinfo/app.php60
1 files changed, 27 insertions, 33 deletions
diff --git a/apps/theming/appinfo/app.php b/apps/theming/appinfo/app.php
index 3d4b993f7bc..dc8e00f4ed5 100644
--- a/apps/theming/appinfo/app.php
+++ b/apps/theming/appinfo/app.php
@@ -26,38 +26,32 @@
*/
$app = new \OCP\AppFramework\App('theming');
-/** @var \OCA\Theming\Util $util */
-$util = $app->getContainer()->query(\OCA\Theming\Util::class);
-if(!$util->isAlreadyThemed()) {
+$app->getContainer()->registerCapability(\OCA\Theming\Capabilities::class);
- $app->getContainer()->registerCapability(\OCA\Theming\Capabilities::class);
+$linkToCSS = \OC::$server->getURLGenerator()->linkToRoute(
+ 'theming.Theming.getStylesheet',
+ [
+ 'v' => \OC::$server->getConfig()->getAppValue('theming', 'cachebuster', '0'),
+ ]
+);
+\OCP\Util::addHeader(
+ 'link',
+ [
+ 'rel' => 'stylesheet',
+ 'href' => $linkToCSS,
+ ]
+);
- $linkToCSS = \OC::$server->getURLGenerator()->linkToRoute(
- 'theming.Theming.getStylesheet',
- [
- 'v' => \OC::$server->getConfig()->getAppValue('theming', 'cachebuster', '0'),
- ]
- );
- \OCP\Util::addHeader(
- 'link',
- [
- 'rel' => 'stylesheet',
- 'href' => $linkToCSS,
- ]
- );
-
- $linkToJs = \OC::$server->getURLGenerator()->linkToRoute(
- 'theming.Theming.getJavascript',
- [
- 'v' => \OC::$server->getConfig()->getAppValue('theming', 'cachebuster', '0'),
- ]
- );
- \OCP\Util::addHeader(
- 'script',
- [
- 'src' => $linkToJs,
- 'nonce' => \OC::$server->getContentSecurityPolicyNonceManager()->getNonce()
- ], ''
- );
-
-} \ No newline at end of file
+$linkToJs = \OC::$server->getURLGenerator()->linkToRoute(
+ 'theming.Theming.getJavascript',
+ [
+ 'v' => \OC::$server->getConfig()->getAppValue('theming', 'cachebuster', '0'),
+ ]
+);
+\OCP\Util::addHeader(
+ 'script',
+ [
+ 'src' => $linkToJs,
+ 'nonce' => \OC::$server->getContentSecurityPolicyNonceManager()->getNonce()
+ ], ''
+); \ No newline at end of file