mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixed issues where a rule is duplicated (cloned) and the new rule is inserted above a separator bar location
This commit is contained in:
parent
1c0083d004
commit
be624266bf
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user