diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-07-10 14:59:15 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-10 14:59:15 +0200 |
commit | 805f50381472849334a3ad95df68ef8ba49f753f (patch) | |
tree | 5097888b6831c56282d2f9243556b05e4a5eac1c | |
parent | a22bc0e78758a86000b1023c93e554ebca696493 (diff) | |
download | nextcloud-server-805f50381472849334a3ad95df68ef8ba49f753f.tar.gz nextcloud-server-805f50381472849334a3ad95df68ef8ba49f753f.zip |
Load theming app css as well if legacy theme is enabled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | apps/theming/appinfo/app.php | 60 |
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 |