summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-02-28 06:00:46 -0800
committerPhil Davis <phil.davis@inf.org>2014-02-28 06:00:46 -0800
commit088a4eed18e192c7577ce79406fc914a9b4a708a (patch)
tree658fca7538132739b4261fecbf4dabec672ec7cd /usr/local/www/firewall_rules_edit.php
parentfa94f1e17e3cce657adb2a3e9182f4d1c0c545fd (diff)
downloadpfsense-088a4eed18e192c7577ce79406fc914a9b4a708a.zip
pfsense-088a4eed18e192c7577ce79406fc914a9b4a708a.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/local/www/firewall_rules_edit.php')
-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 daa5d11..9020ac0 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -1474,18 +1474,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