* CalDAV: big calendars with more then 500 events in result-set were missing events

This commit is contained in:
Ralf Becker 2014-11-10 14:20:08 +00:00
parent ca2b56979c
commit f7a508608b

View File

@ -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;