fix settings read/write
This commit is contained in:
parent
c809e2c6e0
commit
5ceeb79318
@ -55,8 +55,8 @@ class Config extends dcNsProcess
|
|||||||
|
|
||||||
# -- Set settings --
|
# -- Set settings --
|
||||||
try {
|
try {
|
||||||
foreach ($s->listSettings() as $key) {
|
foreach ($s->listSettings() as $key => $value) {
|
||||||
$s->writeSetting($key, $_POST[$key] ?? '');
|
$s->writeSetting($key, $_POST[$key] ?? $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
dcPage::addSuccessNotice(
|
dcPage::addSuccessNotice(
|
||||||
|
@ -91,6 +91,6 @@ class Settings
|
|||||||
*/
|
*/
|
||||||
public function listSettings(): array
|
public function listSettings(): array
|
||||||
{
|
{
|
||||||
return array_keys(get_class_vars(Settings::class));
|
return get_object_vars($this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user