1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 01:04:16 +02:00
This commit is contained in:
Ryan Cramer
2023-03-24 11:33:10 -04:00
parent 16be65c454
commit 43aa000f02

View File

@@ -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
$in = $not ? "NOT IN" : "IN";
$sql .= in_array($field, array('parent', 'parent_id')) ? "$table.parent_id " : "$table.id ";
$IDs = $sanitizer->intArray($IDs);
$strIDs = implode(',', $IDs);
$IDs = $sanitizer->intArray($IDs, array('strict' => true));
$strIDs = count($IDs) ? implode(',', $IDs) : '-1';
$sql .= "$in($strIDs)";
if($subfield === 'sort') $query->orderby("FIELD($table.id, $strIDs)");
unset($strIDs);