diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-03 23:42:58 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-03 23:42:58 +0000 |
commit | e4a721469204bd88ceb57af20470a4778176e2c2 (patch) | |
tree | 77fa29f785d5abedf225ddcc8a700b48f8aad350 | |
parent | 8f8e9cc0f45723a25a99c0f8db0e6afa0ac35dc3 (diff) | |
download | pfsense-e4a721469204bd88ceb57af20470a4778176e2c2.zip pfsense-e4a721469204bd88ceb57af20470a4778176e2c2.tar.gz |
Add <all_interfaces> option
-rwxr-xr-x | usr/local/www/pkg_edit.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php index 5529dd2..b4aad09 100755 --- a/usr/local/www/pkg_edit.php +++ b/usr/local/www/pkg_edit.php @@ -387,8 +387,17 @@ if ($pkg['tabs'] <> "") { $SELECTED = ""; if($pkga['add_to_interfaces_selection'] == $value) $SELECTED = " SELECTED"; echo "<option value='" . $pkga['add_to_interfaces_selection'] . "'" . $SELECTED . ">" . $pkga['add_to_interfaces_selection'] . "</option>\n"; - } - foreach ($config['interfaces'] as $ifname => $iface) { + } + $interfaces = &$config['interfaces']; + if($pkga['all_interfaces'] <> "") { + $ints = `/sbin/ifconfig -l`; + $ints = split(" ", $ints); + $interfaces = array(); + foreach ($ints as $int) { + $interfaces[] = $int; + } + } + foreach ($interfaces as $ifname => $iface) { if ($iface['descr']) $ifdescr = $iface['descr']; else @@ -405,12 +414,11 @@ if ($pkg['tabs'] <> "") { } else { $canecho = 1; } - } - if($canecho == 1) { + if($canecho == 1) echo $to_echo; - echo "</select>\n"; - echo "<br>" . fixup_string($pkga['description']) . "\n"; } + if($canecho == 1) + 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") { |