- filtering by groups fixed, again

This commit is contained in:
Wiesner András 2024-09-26 17:10:35 +02:00
parent a44c34d3a0
commit 97d3b340f3

View File

@ -497,18 +497,20 @@ function get_results_by_gameid(ReqHandler &$rh, array $params): array
global $groupMgr;
$n = 0;
foreach ($groups as $groupname) {
if ($n > 0) { // place OR between each group criterion
$group_filter[] = "OR";
}
$group = $groupMgr->getGroupByUniqueName($groupname);
if ($group !== null) {
if ($n > 0) { // place OR between each group criterion
$group_filter[] = "OR";
}
$nicknames = $group->getMembers();
$group_filter[] = ["nickname", "IN", $nicknames];
$n++;
} else { // a group not found means a faulty query
return [];
}
$n++;
}
} else { // a group not found means a faulty query
return [];
}
// execute filtering