Skip to content

Commit

Permalink
(config/interfaces) some older configurations use <enabled/> in stead…
Browse files Browse the repository at this point in the history
… of our current standard <enabled>1</enabled>. to avoid new issues, its better to convert when only set.
  • Loading branch information
AdSchellevis committed Jul 29, 2016
1 parent 0a71d2e commit c17a834
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/etc/inc/config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c17a834

Please sign in to comment.