diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-01-22 18:28:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-22 18:28:33 +0100 |
commit | bde1150d041de5535e9dd3baaaa957e5a9c7ca89 (patch) | |
tree | e365664834f6f1387d4bf63d3688887d2905afd0 /lib/private/TemplateLayout.php | |
parent | 012e52123900dcaab29989ab12b1848abe8d0a11 (diff) | |
parent | 9619584383621031f421598baf7c5c3e3c0ecd47 (diff) | |
download | nextcloud-server-bde1150d041de5535e9dd3baaaa957e5a9c7ca89.tar.gz nextcloud-server-bde1150d041de5535e9dd3baaaa957e5a9c7ca89.zip |
Merge pull request #3004 from nextcloud/fix-installation-css
Fixed installation page
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 2551f8417a5..9b425bc0568 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -160,16 +160,14 @@ class TemplateLayout extends \OC_Template { $this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); } - // Add the css files and check if server is already installed to prevent - // appdata initialisation before database configuration - if(\OC::$server->getSystemConfig()->getValue('installed', false)) { + // Do not initialise scss appdata until we have a fully installed instance + // Do not load scss for update, errors, installation or login page + if(\OC::$server->getSystemConfig()->getValue('installed', false) + && !\OCP\Util::needUpgrade() + && \OC_User::isLoggedIn()) { $cssFiles = self::findStylesheetFiles(\OC_Util::$styles); } else { - $cssFiles = array( - [\OC::$SERVERROOT, \OC::$WEBROOT, 'core/css/global.css'], - [\OC::$SERVERROOT, \OC::$WEBROOT, 'core/css/fonts.css'], - [\OC::$SERVERROOT, \OC::$WEBROOT, 'core/css/installation.css'] - ); + $cssFiles = self::findStylesheetFiles(\OC_Util::$styles, false); } $this->assign('cssfiles', array()); $this->assign('printcssfiles', []); @@ -199,16 +197,20 @@ class TemplateLayout extends \OC_Template { * @param array $styles * @return array */ - static public function findStylesheetFiles($styles) { + static public function findStylesheetFiles($styles, $compileScss = true) { // Read the selected theme from the config file $theme = \OC_Util::getTheme(); - $SCSSCacher = new SCSSCacher( - \OC::$server->getLogger(), - \OC::$server->getAppDataDir('css'), - \OC::$server->getURLGenerator(), - \OC::$server->getSystemConfig() - ); + if($compileScss) { + $SCSSCacher = new SCSSCacher( + \OC::$server->getLogger(), + \OC::$server->getAppDataDir('css'), + \OC::$server->getURLGenerator(), + \OC::$server->getSystemConfig() + ); + } else { + $SCSSCacher = null; + } $locator = new \OC\Template\CSSResourceLocator( \OC::$server->getLogger(), |