Css installation page fallback

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2016-11-23 17:56:05 +01:00 committed by Roeland Jago Douma
parent 95d85ba8eb
commit 763814f057
No known key found for this signature in database
GPG key ID: F941078878347C0C
2 changed files with 16 additions and 2 deletions

View file

@ -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.
*
*/

View file

@ -159,8 +159,13 @@ class TemplateLayout extends \OC_Template {
$this->append( 'jsfiles', $web.'/'.$file . '?v=' . self::$versionHash); $this->append( 'jsfiles', $web.'/'.$file . '?v=' . self::$versionHash);
} }
// Add the css files // Add the css files and check if server is already installed to prevent
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles); // 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('cssfiles', array());
$this->assign('printcssfiles', []); $this->assign('printcssfiles', []);
$this->assign('versionHash', self::$versionHash); $this->assign('versionHash', self::$versionHash);