From 26dbe74328935a7aa77bccf230189aa703fc51c4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 17 Aug 2016 09:25:31 +0200 Subject: [PATCH] * Calendar: fix SQL error in eSync with double DISTINCT happening under some conditions --- 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 daefcc2c80..17f487881d 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -950,7 +950,7 @@ class calendar_so // we only select cal_table.cal_id (and not cal_table.*) to be able to use DISTINCT (eg. MsSQL does not allow it for text-columns) foreach(array_keys($selects) as $key) { - $selects[$key]['cols'] = "DISTINCT $this->repeats_table.recur_type,range_end AS recur_enddate,$this->repeats_table.recur_interval,$this->repeats_table.recur_data,".$this->db->to_varchar($this->cal_table.'.cal_id').",cal_start,cal_end,$this->user_table.cal_recur_date"; + $selects[$key]['cols'] = "$this->repeats_table.recur_type,range_end AS recur_enddate,$this->repeats_table.recur_interval,$this->repeats_table.recur_data,".$this->db->to_varchar($this->cal_table.'.cal_id').",cal_start,cal_end,$this->user_table.cal_recur_date"; if (!$params['enum_recuring']) { $selects[$key]['cols'] = str_replace(array('cal_start','cal_end'),