From 2a4d7c382bbb5da98fd6b337264f97054628d72c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Nov 2014 14:19:43 +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 8cb611a875..31865db4d3 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -2072,7 +2072,7 @@ class egw_db $select['table_def'], )); } - $sql = count($union) > 1 ? '(' . implode(")\nUNION\n(",$union).')' : $union[0]; + $sql = count($union) > 1 ? '(' . implode(")\nUNION\n(",$union).')' : 'SELECT DISTINCT'.substr($union[0],6); if ($order_by) $sql .= (!stristr($order_by,'ORDER BY') ? "\nORDER BY " : '').$order_by;