From 9602106512ec60798efb3a8702f585213c9030c6 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 5 Jun 2019 14:34:42 -0600 Subject: [PATCH] Calendar - cast cal_id to varchar in sort too to avoid PostgreSQL error --- calendar/inc/class.calendar_so.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index 86ec17e8fb..72be2932e7 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -367,7 +367,7 @@ class calendar_so $cols .= ',range_end-1 AS recur_enddate'; // sort deleted to the end, to prefer non-deleted events over deleted ones when querying by uid - $group_by .= ' ORDER BY cal_deleted IS NOT NULL,egw_cal.cal_id DESC'; + $group_by .= ' ORDER BY cal_deleted IS NOT NULL,' . $this->db->to_varchar($this->cal_table.'.cal_id') . ' DESC'; $events =& $this->get_events($this->db->select($this->cal_table, $cols, $where, __LINE__, __FILE__, false, $group_by, 'calendar', 0, $join), $recur_date);