fix save settings
This commit is contained in:
parent
a1f4d08e26
commit
0107bbb72f
@ -55,8 +55,12 @@ class Config extends dcNsProcess
|
|||||||
# -- Set settings --
|
# -- Set settings --
|
||||||
try {
|
try {
|
||||||
foreach ($s->listSettings() as $key => $value) {
|
foreach ($s->listSettings() as $key => $value) {
|
||||||
|
if (is_bool($value)) {
|
||||||
|
$s->writeSetting($key, !empty($_POST[$key]));
|
||||||
|
} else {
|
||||||
$s->writeSetting($key, $_POST[$key] ?? $value);
|
$s->writeSetting($key, $_POST[$key] ?? $value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dcPage::addSuccessNotice(
|
dcPage::addSuccessNotice(
|
||||||
__('Configuration has been successfully updated.')
|
__('Configuration has been successfully updated.')
|
||||||
|
Loading…
Reference in New Issue
Block a user