X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2Fgroup.php;h=7d21af42a34d123fc38f4379e13d4245106b0087;hb=190efb3a08127072aa3e0876a79e7bf76aa77051;hp=48be87615d8567da268b8994a04ffe62fa3016f0;hpb=004ff79e4c5f3740d13b342ae8678f7680f96f3f;p=platal.git diff --git a/classes/group.php b/classes/group.php index 48be876..7d21af4 100644 --- a/classes/group.php +++ b/classes/group.php @@ -126,7 +126,13 @@ class Group } return null; } - return new Group($res->fetchOneAssoc()); + $data = $res->fetchOneAssoc(); + $positions = XDB::fetchAllAssoc('SELECT position, uid + FROM group_members + WHERE asso_id = {?} AND position IS NOT NULL + ORDER BY position', + $data['id']); + return new Group(array_merge($data, array('positions' => $positions))); } }