Commit 4dcad144 authored by Franco Fichtner's avatar Franco Fichtner

system: default did not reset due to faulty logic

parent 6c3e5c0b
......@@ -221,15 +221,19 @@ if ($_POST) {
if (!isset($config['system']['firmware'])) {
$config['system']['firmware'] = array();
}
if ($_POST['mirror'] == 'default' && isset($config['system']['firmware']['mirror'])) {
/* default does not set anything for backwards compat */
unset($config['system']['firmware']['mirror']);
if ($_POST['mirror'] == 'default') {
if (isset($config['system']['firmware']['mirror'])) {
/* default does not set anything for backwards compat */
unset($config['system']['firmware']['mirror']);
}
} else {
$config['system']['firmware']['mirror'] = $_POST['mirror'];
}
if ($_POST['flavour'] == 'default' && isset($config['system']['firmware']['flavour'])) {
/* default does not set anything for backwards compat */
unset($config['system']['firmware']['flavour']);
if ($_POST['flavour'] == 'default') {
if (isset($config['system']['firmware']['flavour'])) {
/* default does not set anything for backwards compat */
unset($config['system']['firmware']['flavour']);
}
} else {
$config['system']['firmware']['flavour'] = $_POST['flavour'];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment