Fixing basepath issue

This commit is contained in:
Philipp Holzer 2019-03-25 09:39:33 +01:00
parent e4875f2faf
commit d78598b64e
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
4 changed files with 20 additions and 8 deletions

View file

@ -34,10 +34,11 @@ class ConfigFileLoader extends ConfigFileManager
* expected local.config.php
*
* @param IConfigCache $config The config cache to load to
* @param bool $raw Setup the raw config format
*
* @throws \Exception
*/
public function setupCache(IConfigCache $config)
public function setupCache(IConfigCache $config, $raw = false)
{
$config->load($this->loadCoreConfig('defaults'));
$config->load($this->loadCoreConfig('settings'));
@ -48,7 +49,7 @@ class ConfigFileLoader extends ConfigFileManager
$config->load($this->loadCoreConfig('local'), true);
// In case of install mode, add the found basepath (because there isn't a basepath set yet
if ($this->appMode->isInstall()) {
if (!$raw && ($this->appMode->isInstall() || empty($config->get('system', 'basepath')))) {
// Setting at least the basepath we know
$config->set('system', 'basepath', $this->baseDir);
}