summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-02-28 05:57:51 -0800
committerPhil Davis <phil.davis@inf.org>2014-02-28 05:57:51 -0800
commitcd962bb9ef47da7d6dece0587a92694d599d2314 (patch)
treeb283c33b1d64d94b3965d731b446ad9cec1464bf /usr
parent0344d76eca402dbaba9cb4df9448d333e07544d6 (diff)
downloadpfsense-cd962bb9ef47da7d6dece0587a92694d599d2314.zip
pfsense-cd962bb9ef47da7d6dece0587a92694d599d2314.tar.gz
Tidy up GWG dropdown selection tests
Tested this making a new rule, and editing existing IPv4, IPv6 and IPv4+Ipv6 rules, and switching the IP version on an existing rule. Seems to work!
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 2b4f30c..525e40d 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -1456,18 +1456,14 @@ $i--): ?>
/* add gateway groups to the list */
if (is_array($a_gatewaygroups)) {
foreach($a_gatewaygroups as $gwg_name => $gwg_data) {
- if(($pconfig['ipprotocol'] == "inet46"))
- continue;
- if(($pconfig['ipprotocol'] == "inet6") && ($gwg_data['ipprotocol'] != "inet6"))
- continue;
- if(($pconfig['ipprotocol'] == "inet") && ($gwg_data['ipprotocol'] != "inet"))
- continue;
- if($pconfig['gateway'] == $gwg_name) {
- $selected = " selected=\"selected\"";
- } else {
- $selected = "";
+ if((empty($pconfig['ipprotocol'])) || ($pconfig['ipprotocol'] == $gwg_data['ipprotocol'])) {
+ if($pconfig['gateway'] == $gwg_name) {
+ $selected = " selected=\"selected\"";
+ } else {
+ $selected = "";
+ }
+ echo "<option value=\"{$gwg_name}\" $selected>{$gwg_name}</option>\n";
}
- echo "<option value=\"{$gwg_name}\" $selected>{$gwg_name}</option>\n";
}
}
?>
OpenPOWER on IntegriCloud