diff options
author | gnhb <gnoahb@gmail.com> | 2010-09-16 10:45:50 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-09-16 10:45:50 +0700 |
commit | 144d0e793de61366340758b28f169c3afeeba922 (patch) | |
tree | 88672103e35ec5bc74fb1219ba4744a753ad21a5 /etc | |
parent | 01f1b6012285ab25c266f3733b89e4b96b01132c (diff) | |
download | pfsense-144d0e793de61366340758b28f169c3afeeba922.zip pfsense-144d0e793de61366340758b28f169c3afeeba922.tar.gz |
Reorder the way this list (get_configured_interface_list) is generated to make it more beautiful.
I know you guys said don't bother, but it's just cosmetic, and it took 10 seconds.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index f07e2aa..0437039 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -566,21 +566,19 @@ function get_configured_interface_list($only_opt = false, $withdisabled = false) global $config; $iflist = array(); - - if (!$only_opt) { - if (isset($config['interfaces']['wan'])) - $iflist['wan'] = "wan"; - if (isset($config['interfaces']['lan'])) - $iflist['lan'] = "lan"; - } - /* if list */ - foreach($config['interfaces'] as $if => $ifdetail) { + foreach($config['interfaces'] as $if => $ifdetail) { if ($if == "wan" || $if == "lan") continue; if (isset($ifdetail['enable']) || $withdisabled == true) $iflist[$if] = $if; } + if (!$only_opt) { + if (isset($config['interfaces']['lan'])) + $iflist['lan'] = "lan"; + if (isset($config['interfaces']['wan'])) + $iflist['wan'] = "wan"; + } return $iflist; } |