diff options
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index bc6a485ad43..c3197b00282 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -162,14 +162,11 @@ class TemplateLayout extends \OC_Template { // 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)) { + // Prevent scss initialisation if an update is needed + if(\OC::$server->getSystemConfig()->getValue('installed', false) && !\OCP\Util::needUpgrade()) { $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', []); @@ -190,16 +187,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(), |