1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 08:44:46 +02:00
This commit is contained in:
Ryan Cramer
2025-05-02 11:46:44 -04:00
parent 8322725f35
commit e8f8317b48

View File

@@ -1836,7 +1836,12 @@ class PageFinder extends Wire {
if(in_array($operator, array('=', '!=', '<', '<=', '>', '>='))) {
// we only accommodate this optimization for single-value selectors...
if($this->whereEmptyValuePossible($field, $subfield, $selector, $query, $value, $whereFields)) {
if(count($valueArray) > 1 && $operator == '=') $whereFieldsType = 'OR';
if(count($valueArray) > 1) {
if($operator == '=') $whereFieldsType = 'OR';
} else {
$fieldCnt[$field->table]--;
if($fieldCnt[$field->table] < 1) unset($fieldCnt[$field->table]);
}
continue;
}
}
@@ -2241,6 +2246,7 @@ class PageFinder extends Wire {
}
$query->leftjoin("$table AS $tableAlias ON $tableAlias.pages_id=pages.id");
bd("leftjoin $table as $tableAlias on $tableAlias.pages_id=pages.id");
$where .= strlen($where) ? " $whereType ($sql)" : "($sql)";
return true;