summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-01-28 12:59:57 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-01-28 13:00:26 -0500
commitadd097d214a4fdf6ac7a78f75952f4adbdd76aaa (patch)
tree43276c2656310c6b3e4de6a58fd7708445668c6d /src/usr/local/www/firewall_rules_edit.php
parenta4eef0c7caa4b8dbfdc37b2d5310a2fb7b23714e (diff)
downloadpfsense-add097d214a4fdf6ac7a78f75952f4adbdd76aaa.zip
pfsense-add097d214a4fdf6ac7a78f75952f4adbdd76aaa.tar.gz
Re-order separators on adding a new rule at the top
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index dc638f3..c0d8cc2 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -911,6 +911,14 @@ if ($_POST) {
$filterent['created'] = make_config_revision_entry();
if (is_numeric($after)) {
array_splice($a_filter, $after+1, 0, array($filterent));
+
+ // Update the separators
+ $a_separators = &$config['filter']['separator'][$if];
+
+ 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);
+ }
} else {
$a_filter[] = $filterent;
}
OpenPOWER on IntegriCloud