fix save settings

This commit is contained in:
Jean-Christian Paul Denis 2023-05-30 00:23:23 +02:00
parent a1f4d08e26
commit 0107bbb72f
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -55,8 +55,12 @@ class Config extends dcNsProcess
# -- Set settings --
try {
foreach ($s->listSettings() as $key => $value) {
if (is_bool($value)) {
$s->writeSetting($key, !empty($_POST[$key]));
} else {
$s->writeSetting($key, $_POST[$key] ?? $value);
}
}
dcPage::addSuccessNotice(
__('Configuration has been successfully updated.')