FIX #36447 Email Collector subject/body exclusion filters not working
The '!' prefix was removed at line 1369-1373 before being tested at lines 1398 and 1406, causing exclusion filters to never work. This fix uses the $not variable (already set correctly) instead of re-testing for '!' on the modified rulevalue.
This commit is contained in:
parent
b17f37bc93
commit
04bc3ee058
1 changed files with 4 additions and 4 deletions
|
|
@ -1395,17 +1395,17 @@ class EmailCollector extends CommonObject
|
|||
array_push($criteria, array($not."CC" => $rule['rulevalue']));
|
||||
}
|
||||
if ($rule['type'] == 'subject') {
|
||||
if (strpos($rule['rulevalue'], '!') === 0) {
|
||||
if ($not) {
|
||||
//array_push($criteria, array("NOT SUBJECT" => $rule['rulevalue']));
|
||||
$searchfilterexcludesubjectarray[] = preg_replace('/^!/', '', $rule['rulevalue']);
|
||||
$searchfilterexcludesubjectarray[] = $rule['rulevalue'];
|
||||
} else {
|
||||
array_push($criteria, array("SUBJECT" => $rule['rulevalue']));
|
||||
}
|
||||
}
|
||||
if ($rule['type'] == 'body') {
|
||||
if (strpos($rule['rulevalue'], '!') === 0) {
|
||||
if ($not) {
|
||||
//array_push($criteria, array("NOT BODY" => $rule['rulevalue']));
|
||||
$searchfilterexcludebodyarray[] = preg_replace('/^!/', '', $rule['rulevalue']);
|
||||
$searchfilterexcludebodyarray[] = $rule['rulevalue'];
|
||||
} else {
|
||||
array_push($criteria, array("BODY" => $rule['rulevalue']));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue