add setting defaults per distribution when given

This commit is contained in:
Ante de Baas
2020-05-29 14:59:40 +02:00
parent 814339cc73
commit 022ed1a9a8

View File

@@ -505,6 +505,15 @@ class FroxlorInstall
$this->_updateSetting($upd_stmt, 'error', 'system', 'errorlog_level');
}
if (file_exists(dirname(__DIR__).'/../lib/configfiles/'.$this->_data['distribution'].'.xml')) {
$xml = simplexml_load_file(dirname(__DIR__).'/../lib/configfiles/'.$this->_data['distribution'].'.xml');
foreach($xml->distribution->defaults->propery as $property) {
$this->_updateSetting($upd_stmt, $property->value[0], $property->group[0], $property->name[0]);
}
} else {
exit('Failed to open distribution XML file.');
}
$this->_updateSetting($upd_stmt, $this->_data['activate_newsfeed'], 'admin', 'show_news_feed');
$this->_updateSetting($upd_stmt, dirname(dirname(dirname(__FILE__))), 'system', 'letsencryptchallengepath');