Commit c17a834f authored by Ad Schellevis's avatar Ad Schellevis

(config/interfaces) some older configurations use <enabled/> in stead of our...

(config/interfaces) some older configurations use <enabled/> in stead of our current standard <enabled>1</enabled>. to avoid new issues, its better to convert when only set.
parent 0a71d2ea
......@@ -59,7 +59,11 @@ function legacy_config_get_interfaces($filters = array())
// apply filters
$iface_match = true;
foreach ($filters as $filter_key => $filter_value) {
$field_value = isset($iface[$filter_key]) ? $iface[$filter_key] : false;
if ($filter_key == 'enable' && isset($iface[$filter_key])) {
$field_value = true;
} else {
$field_value = isset($iface[$filter_key]) ? $iface[$filter_key] : false;
}
if ($field_value != $filter_value) {
$iface_match = false;
break;
......
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