diff --git a/core/css/installation.css b/core/css/installation.css new file mode 100644 index 0000000000..a57f7c00ea --- /dev/null +++ b/core/css/installation.css @@ -0,0 +1,9 @@ +/* + * Installation css file. + * This file is used on the install page only when the database + * isn't set, preventing scss files to be stored using the AppdataController. + * It should contain every style needed to correctly display the installation template. + * + */ + + \ No newline at end of file diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 9711b0ff2f..8c8f9cfc33 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -159,8 +159,13 @@ class TemplateLayout extends \OC_Template { $this->append( 'jsfiles', $web.'/'.$file . '?v=' . self::$versionHash); } - // Add the css files - $cssFiles = self::findStylesheetFiles(\OC_Util::$styles); + // 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)) { + $cssFiles = self::findStylesheetFiles(\OC_Util::$styles); + } else { + $cssFiles = array(array(\OC::$SERVERROOT, '', 'core/css/installation.css')); + } $this->assign('cssfiles', array()); $this->assign('printcssfiles', []); $this->assign('versionHash', self::$versionHash);