diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-02-10 13:46:05 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-02-10 13:46:05 -0500 |
commit | 0f68e35268f4acd4d534eb98028b191a8bae60ac (patch) | |
tree | f9feac344c731b1cbb141ff462aa36584d47bdca /usr | |
parent | 366e5d8cc237bc016bc6b7ddb85b0f2f5d775b29 (diff) | |
download | pfsense-0f68e35268f4acd4d534eb98028b191a8bae60ac.zip pfsense-0f68e35268f4acd4d534eb98028b191a8bae60ac.tar.gz |
Test that item has a value instead of using isset which
will return true on blank <descr/> items.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/pkg_edit.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php index dde4af9..5a1a3bf 100755 --- a/usr/local/www/pkg_edit.php +++ b/usr/local/www/pkg_edit.php @@ -432,12 +432,10 @@ if ($pkg['tabs'] <> "") { $multiple = 'multiple'; } print("<select id='" . $pkga['fieldname'] . "' name=\"$fieldname\" $size $multiple>\n"); - if (isset($pkga['all_interfaces'])) $ifaces = explode(' ', trim(shell_exec('ifconfig -l'))); else $ifaces = $config['interfaces']; - $additional_ifaces = $pkga['add_to_interfaces_selection']; if (!empty($additional_ifaces)) $ifaces = array_merge($ifaces, explode(',', $additional_ifaces)); @@ -445,9 +443,8 @@ if ($pkg['tabs'] <> "") { $values = $value; else $values = explode(',', $value); - foreach($ifaces as $ifname => $iface) { - if (isset($iface['descr'])) + if($iface['descr'] <> "") $ifdescr = $iface['descr']; else $ifdescr = strtoupper($ifname); @@ -456,7 +453,6 @@ if ($pkg['tabs'] <> "") { $selected = (in_array($ifname, $values) ? 'selected' : ''); print("<option value=\"$ifname\" $selected>$ifdescr</option>\n"); } - print("</select>\n<br />" . fixup_string($pkga['description']) . "\n"); } else if($pkga['type'] == "radio") { echo "<input type='radio' id='" . $pkga['fieldname'] . "' name='" . $pkga['fieldname'] . "' value='" . $value . "'>"; @@ -464,7 +460,6 @@ if ($pkg['tabs'] <> "") { ?> <script type="text/javascript" language='javascript'> <!-- - <?php $rowcounter = 0; $fieldcounter = 0; @@ -474,10 +469,8 @@ if ($pkg['tabs'] <> "") { $fieldcounter++; } ?> - --> </script> - <table name="maintable" id="maintable"> <tr> <?php |