diff options
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index df1f087..f5890c6 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -168,7 +168,8 @@ if (isset($id) && $a_filter[$id]) { //schedule support $pconfig['sched'] = $a_filter[$id]['sched']; - $pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id']; + if (!isset($_GET['dup'])) + $pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id']; } else { /* defaults */ @@ -643,9 +644,10 @@ include("head.inc"); $interfaces["enc0"] = "IPsec"; /* add openvpn/tun interfaces */ if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) - $interfaces["openvpn"] = "OpenVPN"; + $interfaces["openvpn"] = "OpenVPN"; + $selected_interfaces = explode(",", $pconfig['interface']); foreach ($interfaces as $iface => $ifacename): ?> - <option value="<?=$iface;?>" <?php if ($pconfig['interface'] <> "" && (strcasecmp($pconfig['interface'], $iface) == 0)) echo "selected"; ?>><?=$ifacename?></option> + <option value="<?=$iface;?>" <?php if ($pconfig['interface'] <> "" && ( strcasecmp($pconfig['interface'], $iface) == 0 || in_array($iface, $selected_interfaces) )) echo "selected"; ?>><?=$ifacename?></option> <?php endforeach; ?> </select> <br /> |