From f7a508608b13a54852c6d4e7d38300bc24159aa3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Nov 2014 14:20:08 +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;