From 0c614b444934f64af3ce3a412a33bf86a6f1f848 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Nov 2014 14:21:49 +0000 Subject: [PATCH] * CalDAV: big calendars with more then 500 events in result-set were missing events --- phpgwapi/inc/class.egw_db.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 1af9bb743f..2fa8823ce5 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -2067,7 +2067,7 @@ class egw_db $select['table_def'], )); } - $sql = count($sql) > 1 ? '(' . implode(")\nUNION\n(",$sql).')' : $sql[0]; + $sql = count($sql) > 1 ? '(' . implode(")\nUNION\n(",$sql).')' : 'SELECT DISTINCT'.substr($sql[0],6); if ($order_by) $sql .= (!stristr($order_by,'ORDER BY') ? "\nORDER BY " : '').$order_by;