[setup] allow setting bool option to false if default is true

This commit is contained in:
discomrade 2024-07-17 01:30:14 +00:00 committed by Shish
parent d809b0b18e
commit 30b437542d

View file

@ -405,11 +405,16 @@ class Setup extends Extension
$config->set_array($name, $value);
break;
}
} else {
// browsers don't send empty checkboxes, false value must be stored in case default is true
if ($type == "bool") {
$config->set_bool($name, false);
} else {
$config->delete($name);
}
}
}
}
log_warning("setup", "Configuration updated");
}