Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-07-10 15:59:15 +0300
committerJulius Härtl <jus@bitgrid.net>2018-07-10 15:59:15 +0300
commit805f50381472849334a3ad95df68ef8ba49f753f (patch)
tree5097888b6831c56282d2f9243556b05e4a5eac1c /apps/theming
parenta22bc0e78758a86000b1023c93e554ebca696493 (diff)
Load theming app css as well if legacy theme is enabled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
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