summaryrefslogtreecommitdiffstats
path: root/lib/private/TemplateLayout.php
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-13 01:55:12 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-13 01:55:12 +0200
commit8c004fdc64f5234b0f4f5baa7c9db90c522ede9e (patch)
tree28f5ebd78ba3bcb025a525c68a86b744a6ee2fcb /lib/private/TemplateLayout.php
parent09d5b61c9e468cdc0b92db27946140e68192e2e5 (diff)
downloadnextcloud-server-8c004fdc64f5234b0f4f5baa7c9db90c522ede9e.tar.gz
nextcloud-server-8c004fdc64f5234b0f4f5baa7c9db90c522ede9e.zip
Enable SCSS for guest pages
SCSS is disabled for several types of pages, as the SCSS compiler uses the cache system, which is not available for example when Nextcloud is not installed yet. However, in regular guest pages the cache system is available, so SCSS is now enabled for them too. To keep the same behaviour for guest pages the guest style is automatically added for them, as before this commit it was automatically added due to SCSS not being used. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r--lib/private/TemplateLayout.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 5e6719593a3..1efdf8b441c 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -122,6 +122,7 @@ class TemplateLayout extends \OC_Template {
$this->assign('bodyid', 'body-login');
} else if ($renderAs == 'guest') {
parent::__construct('core', 'layout.guest');
+ \OC_Util::addStyle('guest');
$this->assign('bodyid', 'body-login');
} else if ($renderAs == 'public') {
parent::__construct('core', 'layout.public');
@@ -187,7 +188,7 @@ class TemplateLayout extends \OC_Template {
&& !\OCP\Util::needUpgrade()
&& $pathInfo !== ''
&& !preg_match('/^\/login/', $pathInfo)
- && $renderAs !== 'error' && $renderAs !== 'guest'
+ && $renderAs !== 'error'
) {
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
} else {