summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_nat_edit.php
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-02-12 00:03:50 -0800
committerNOYB <Al_Stu@Frontier.com>2016-02-12 00:03:50 -0800
commita4f41878a579bfdd1e3234efe93a144149f2326d (patch)
treeb6ecba2c46606564f78693000fc1fc022a1c448a /src/usr/local/www/firewall_nat_edit.php
parent99a05a0a051c7722f800b5ed0f6560ec8d5fbda0 (diff)
downloadpfsense-a4f41878a579bfdd1e3234efe93a144149f2326d.zip
pfsense-a4f41878a579bfdd1e3234efe93a144149f2326d.tar.gz
Firewall / Rules - Consolidate Move Separators Function
Consolidate the moving of separators for add/copy/dup/delete into a generic function.
Diffstat (limited to 'src/usr/local/www/firewall_nat_edit.php')
-rw-r--r--src/usr/local/www/firewall_nat_edit.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php
index af7f637..fc29648 100644
--- a/src/usr/local/www/firewall_nat_edit.php
+++ b/src/usr/local/www/firewall_nat_edit.php
@@ -518,15 +518,9 @@ if ($_POST) {
// Update the separators
$a_separators = &$config['nat']['separator'];
-
- for ($idx=0; isset($a_separators['sep' . $idx]); $idx++ ) {
- $seprow = substr($a_separators['sep' . $idx]['row']['0'], 2);
-
- // 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);
- }
- }
+ $ridx = $after;
+ $mvnrows = +1;
+ move_separators($a_separators, $ridx, $mvnrows);
} else {
$a_nat[] = $natent;
}
OpenPOWER on IntegriCloud