Fixed issues where a rule is duplicated (cloned) and the new rule is inserted above a separator bar location

This commit is contained in:
Stephen Beaver 2016-01-29 08:59:23 -05:00
parent 1c0083d004
commit be624266bf
2 changed files with 10 additions and 2 deletions

View File

@ -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;

View File

@ -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;