diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-03-17 16:24:49 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-03-17 16:24:49 +0100 |
| commit | 2435dab6002d6f826302cf31dc6bf5ada9923efa (patch) | |
| tree | 70d0b3f857d3742e2c8ecfaeef55341ffe4e22c0 /app | |
| parent | 281ef4bcb67f2c39f3cd16c3c2f6ae02d6f6296a (diff) | |
fix shuffling of group_ids, re #6363
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/my_studygroups.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/my_studygroups.php b/app/controllers/my_studygroups.php index 5241706..bc7c0bd 100644 --- a/app/controllers/my_studygroups.php +++ b/app/controllers/my_studygroups.php @@ -154,9 +154,7 @@ class MyStudygroupsController extends AuthenticatedController ORDER BY `seminare`.`mkdate` DESC LIMIT 12 ) AS `new_groups` - ) AS `all_groups` - - LIMIT :amount"; + ) AS `all_groups`"; $group_ids = DBManager::get()->fetchFirst($query, [ ':studygroup_types' => $studygroup_sem_types, ':me' => $user_id, @@ -165,6 +163,7 @@ class MyStudygroupsController extends AuthenticatedController // Zufällig sortieren ist in PHP schneller als in SQL shuffle($group_ids); + $group_ids = array_slice($group_ids, 0, $amount); $cache->write($cache_id, $group_ids, 15 * 60); return Course::findMany($group_ids); |
