From b6c7f1d96b14ae3038a329d977a3f1db96468ab7 Mon Sep 17 00:00:00 2001 From: Nicolas Dunand Date: Tue, 19 Nov 2024 16:18:48 +0100 Subject: [PATCH] Revert "Fix #229" This reverts commit ec2b44d779baed7f62c71e7b7ff0f8868626ea24. --- lib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib.php b/lib.php index ab10538..345d081 100644 --- a/lib.php +++ b/lib.php @@ -851,14 +851,12 @@ function choicegroup_get_choicegroup($choicegroupid) { $grpfilter = "AND grp_o.groupid = :groupid"; } - $castorderby = ($sortcolumn == 'name') ? $DB->sql_cast_char2int("REGEXP_SUBSTR($sortcolumn, '[0-9]+')") . "," : ""; - $sql = "SELECT grp_m.id grpmemberid, grp_m.userid, grp_o.id, grp_o.groupid, grp_o.maxanswers FROM {groups} grp INNER JOIN {choicegroup_options} grp_o on grp.id = grp_o.groupid LEFT JOIN {groups_members} grp_m on grp_m.groupid = grp_o.groupid WHERE grp_o.choicegroupid = :choicegroupid $grpfilter - ORDER BY $castorderby $sortcolumn ASC"; + ORDER BY $sortcolumn ASC"; $rs = $DB->get_recordset_sql($sql, $params);