mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 18:24:57 +02:00
Fix issue processwire/processwire-issues#1709
This commit is contained in:
@@ -2775,8 +2775,8 @@ class PageFinder extends Wire {
|
|||||||
// parentIDs or IDs found via another query, and we don't need to match anything other than the parent ID
|
// parentIDs or IDs found via another query, and we don't need to match anything other than the parent ID
|
||||||
$in = $not ? "NOT IN" : "IN";
|
$in = $not ? "NOT IN" : "IN";
|
||||||
$sql .= in_array($field, array('parent', 'parent_id')) ? "$table.parent_id " : "$table.id ";
|
$sql .= in_array($field, array('parent', 'parent_id')) ? "$table.parent_id " : "$table.id ";
|
||||||
$IDs = $sanitizer->intArray($IDs);
|
$IDs = $sanitizer->intArray($IDs, array('strict' => true));
|
||||||
$strIDs = implode(',', $IDs);
|
$strIDs = count($IDs) ? implode(',', $IDs) : '-1';
|
||||||
$sql .= "$in($strIDs)";
|
$sql .= "$in($strIDs)";
|
||||||
if($subfield === 'sort') $query->orderby("FIELD($table.id, $strIDs)");
|
if($subfield === 'sort') $query->orderby("FIELD($table.id, $strIDs)");
|
||||||
unset($strIDs);
|
unset($strIDs);
|
||||||
|
Reference in New Issue
Block a user