diff options
Diffstat (limited to 'src')
-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; |