Enable smartblocks with same criteria to stay separate if created with new criteria

This commit is contained in:
Robbt 2019-01-19 21:29:14 -05:00
parent 2b057472ca
commit 8095f6e627

View file

@ -1641,9 +1641,12 @@ SQL;
Logging::info('adding and');
$qry->addAnd($spCriteria, $spCriteriaValue, $spCriteriaModifier);
}
// only add this NOT LIKE null if you aren't also matching on another criteria
if ($i == 0) {
if ($spCriteriaModifier == Criteria::NOT_ILIKE || $spCriteriaModifier == Criteria::NOT_EQUAL) {
$qry->addOr($spCriteria, null, Criteria::ISNULL);
}
}
} catch (Exception $e) {
Logging::info($e);
}