Introduce ConfigFileManager for config files
This commit is contained in:
@@ -100,16 +100,18 @@ HELP;
|
||||
|
||||
$enabled = intval($this->getArgument(0));
|
||||
|
||||
$this->config->set('system', 'maintenance', $enabled);
|
||||
$this->config->set('system', 'maintenance', $enabled, false);
|
||||
|
||||
$reason = $this->getArgument(1);
|
||||
|
||||
if ($enabled && $this->getArgument(1)) {
|
||||
$this->config->set('system', 'maintenance_reason', $this->getArgument(1));
|
||||
$this->config->set('system', 'maintenance_reason', $this->getArgument(1), false);
|
||||
} else {
|
||||
$this->config->set('system', 'maintenance_reason', '');
|
||||
$this->config->set('system', 'maintenance_reason', '', false);
|
||||
}
|
||||
|
||||
$this->config->save();
|
||||
|
||||
if ($enabled) {
|
||||
$mode_str = "maintenance mode";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user