mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 08:44:46 +02:00
Fix issue processwire/processwire-issues#2067
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user