mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 18:24:57 +02:00
Fix behavior of PageFinder when selector has multiple fields before a != operator and no values after the operator, i.e. a|b|c!=
This commit is contained in:
@@ -2146,7 +2146,9 @@ class PageFinder extends Wire {
|
||||
|
||||
} else if($operator === '!=' || $operator === '<>') {
|
||||
// not equals
|
||||
$whereType = 'AND';
|
||||
$whereType = count($selector->fields()) > 1 && $ft->isEmptyValue($field, $value) ? 'OR' : 'AND';
|
||||
// alternate and technically more consistent behavior, but doesn't seem useful:
|
||||
// $whereType = count($selector->fields()) > 1 ? 'OR' : 'AND';
|
||||
$zeroIsEmpty = $ft->isEmptyValue($field, "0");
|
||||
$zeroIsNotEmpty = !$zeroIsEmpty;
|
||||
$value = (string) $value;
|
||||
|
@@ -360,8 +360,7 @@ abstract class ProcessPageListRender extends Wire {
|
||||
}
|
||||
|
||||
if(!empty($options['noTags']) && strpos($value, '<') !== false) {
|
||||
// legacy code, appears to be impossible to reach
|
||||
$value = strip_tags($value);
|
||||
$value = strip_tags(str_replace('<', ' <', $value));
|
||||
}
|
||||
|
||||
return $icon . trim($value);
|
||||
@@ -573,4 +572,3 @@ abstract class ProcessPageListRender extends Wire {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user