diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-03 23:56:20 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-03 23:56:20 +0000 |
commit | e6a121518c8acb6152713f667f8654a28760d699 (patch) | |
tree | ec24d191fa44b556b49b088348e63d6c11060a36 /usr | |
parent | 18159e538b61b1ec44ccbcc142a25393072b3845 (diff) | |
download | pfsense-e6a121518c8acb6152713f667f8654a28760d699.zip pfsense-e6a121518c8acb6152713f667f8654a28760d699.tar.gz |
Correctly show all interfaces
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/pkg_edit.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php index b4aad09..c5ea333 100755 --- a/usr/local/www/pkg_edit.php +++ b/usr/local/www/pkg_edit.php @@ -390,10 +390,10 @@ if ($pkg['tabs'] <> "") { } $interfaces = &$config['interfaces']; if($pkga['all_interfaces'] <> "") { - $ints = `/sbin/ifconfig -l`; - $ints = split(" ", $ints); + $ints = split(" ", `/sbin/ifconfig -l`); $interfaces = array(); foreach ($ints as $int) { + $interfaces[]['descr'] = $int; $interfaces[] = $int; } } @@ -403,13 +403,16 @@ if ($pkg['tabs'] <> "") { else $ifdescr = strtoupper($ifname); $ifname = $iface['descr']; + if($pkga['all_interfaces'] <> "") + $ifdescr = $iface; $SELECTED = ""; if($value == $ifdescr) $SELECTED = " SELECTED"; $to_echo = "<option value='" . $ifdescr . "'" . $SELECTED . ">" . $ifdescr . "</option>\n"; $to_echo .= "<!-- {$value} -->"; + $to_echo .= "<!-- {$iface} -->"; $canecho = 0; if($pkga['interface_filter'] <> "") { - if(stristr($value, $pkga['interface_filter']) == true) + if(stristr($iface, $pkga['interface_filter']) == true) $canecho = 1; } else { $canecho = 1; @@ -417,8 +420,7 @@ if ($pkg['tabs'] <> "") { if($canecho == 1) echo $to_echo; } - if($canecho == 1) - echo "</select>\n<br>" . fixup_string($pkga['description']) . "\n"; + echo "</select>\n<br>" . fixup_string($pkga['description']) . "\n"; } else if($pkga['type'] == "radio") { echo "<input type='radio' name='" . $pkga['fieldname'] . "' value='" . $value . "'>"; } else if($pkga['type'] == "rowhelper") { |