From 97d3b340f3f1f38bcb913f7872259d41a04ce30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiesner=20Andr=C3=A1s?= Date: Thu, 26 Sep 2024 17:10:35 +0200 Subject: [PATCH] - filtering by groups fixed, again --- interface.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/interface.php b/interface.php index 8b085da..b27fedc 100644 --- a/interface.php +++ b/interface.php @@ -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