diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-29 08:59:23 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-29 09:00:13 -0500 |
commit | be624266bf94dfc4124fdeb5406f74cb8f2e66d9 (patch) | |
tree | 0774e9b5f402d566b18dbd1391e76a4afeb13ce7 /src/usr | |
parent | 1c0083d004e4aeaad0c22f63df393f40243e4dd4 (diff) | |
download | pfsense-be624266bf94dfc4124fdeb5406f74cb8f2e66d9.zip pfsense-be624266bf94dfc4124fdeb5406f74cb8f2e66d9.tar.gz |
Fixed issues where a rule is duplicated (cloned) and the new rule is inserted above a separator bar location
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/firewall_nat_edit.php | 6 | ||||
-rw-r--r-- | src/usr/local/www/firewall_rules_edit.php | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php index 2ffbcad..2165a32 100644 --- a/src/usr/local/www/firewall_nat_edit.php +++ b/src/usr/local/www/firewall_nat_edit.php @@ -521,7 +521,11 @@ if ($_POST) { for ($idx=0; isset($a_separators['sep' . $idx]); $idx++ ) { $seprow = substr($a_separators['sep' . $idx]['row']['0'], 2); - $a_separators['sep' . $idx]['row']['0'] = 'fr' . ($seprow + 1); + + // If the separator is located after the place where the new rule is to go, increment the separator row + if ($seprow > $after) { + $a_separators['sep' . $idx]['row']['0'] = 'fr' . ($seprow + 1); + } } } else { $a_nat[] = $natent; diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index c0d8cc2..ba692bb 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -917,7 +917,11 @@ if ($_POST) { for ($idx=0; isset($a_separators['sep' . $idx]); $idx++ ) { $seprow = substr($a_separators['sep' . $idx]['row']['0'], 2); - $a_separators['sep' . $idx]['row']['0'] = 'fr' . ($seprow + 1); + + // If the separator is located after the place where the new rule is to go, increment the separator row + if ($seprow > $after) { + $a_separators['sep' . $idx]['row']['0'] = 'fr' . ($seprow + 1); + } } } else { $a_filter[] = $filterent; |