summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2016-11-23 17:56:05 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-01-06 09:42:13 +0100
commit763814f057cce0221d298aa045eaee20fa067a51 (patch)
tree2317ff78a826c8ba10728315743d35ebed1e9602
parent95d85ba8eb3ba65d457fbfe935fe60eda878f2e8 (diff)
downloadnextcloud-server-763814f057cce0221d298aa045eaee20fa067a51.tar.gz
nextcloud-server-763814f057cce0221d298aa045eaee20fa067a51.zip
Css installation page fallback
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--core/css/installation.css9
-rw-r--r--lib/private/TemplateLayout.php9
2 files changed, 16 insertions, 2 deletions
diff --git a/core/css/installation.css b/core/css/installation.css
new file mode 100644
index 00000000000..a57f7c00eaa
--- /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 9711b0ff2f8..8c8f9cfc33b 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);