mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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.
This commit is contained in:
parent
01f1b60122
commit
144d0e793d
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user