From 6f20d516466f50798c147ae228f39b4826a4b7db Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 15 Jun 2012 11:25:29 +0200 Subject: [PATCH] fix generateEventOutput for calendar hook --- apps/calendar/lib/app.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index 4bd1e1b7119..4adfa28dd19 100644 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -362,17 +362,14 @@ class OC_Calendar_App{ * @return (array) $output - readable output */ public static function generateEventOutput($event, $start, $end){ - // Why is the following code necessary ? // - /*if(isset($event['calendardata'])){ + if(isset($event['calendardata'])){ $object = OC_VObject::parse($event['calendardata']); $vevent = $object->VEVENT; }else{ $vevent = $event['vevent']; - }*/ + } $return = array(); $id = $event['id']; - $object = $object = OC_VObject::parse($event['calendardata']); - $vevent = $object->VEVENT; $allday = ($vevent->DTSTART->getDateType() == Sabre_VObject_Element_DateTime::DATE)?true:false; $last_modified = @$vevent->__get('LAST-MODIFIED'); $lastmodified = ($last_modified)?$last_modified->getDateTime()->format('U'):0; -- 2.39.5