Function calendar_ical.aggregate_periods() returns only the last event

This commit is contained in:
nicorac 2018-12-18 16:04:22 +01:00
parent 376be571ba
commit 64c1c126c0

View File

@ -3300,9 +3300,9 @@ class calendar_ical extends calendar_boupdate
// sort by start datetime
uasort($events, function($a, $b)
{
$diff = $a['start'] < $b['start'];
$diff = $a['start'] - $b['start'];
return !$diff ? 0 : ($diff < 0 ? -1 : 1);
return $diff == 0 ? 0 : ($diff < 0 ? -1 : 1);
});
$fbdata = array();