From add097d214a4fdf6ac7a78f75952f4adbdd76aaa Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Thu, 28 Jan 2016 12:59:57 -0500 Subject: Re-order separators on adding a new rule at the top --- src/usr/local/www/firewall_rules_edit.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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; } -- cgit v1.1