From 09d130d10a7b6ca06df3fcc0bf5c9f58c8759aac Mon Sep 17 00:00:00 2001 From: unclecheese Date: Wed, 12 Sep 2012 16:47:20 -0300 Subject: [PATCH] BUGFIX: Calendar was not merging feeds from other calendars. --- code/Calendar.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/Calendar.php b/code/Calendar.php index 801d326..0f9ab27 100755 --- a/code/Calendar.php +++ b/code/Calendar.php @@ -173,10 +173,8 @@ public function getDateToEventRelation() { public function getEventList($start, $end, $filter = null, $limit = null, $announcement_filter = null) { - + $eventList = new ArrayList(); foreach($this->getAllCalendars() as $calendar) { - - $eventList = new ArrayList(); if($events = $calendar->getStandardEvents($start, $end, $filter)) { $eventList->merge($events); } @@ -204,11 +202,9 @@ public function getEventList($start, $end, $filter = null, $limit = null, $annou } - $eventList->sort(array("StartDate" => "ASC", "StartTime" => "ASC")); - - // if($this->Feeds()) { - // $event_list = $this->importFromFeeds($event_list); - // } + + $eventList = $eventList->sort(array("StartDate" => "ASC", "StartTime" => "ASC")); + $eventList = $eventList->limit($limit); return $eventList; }