From 10f5a485316c6df798c756c4e8518ac939c6ffc7 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 6 Feb 2014 10:54:57 +0100 Subject: [PATCH] Add fallback to find VEVENT blocks with RECURRENCE-ID (#2792) --- plugins/libcalendaring/libvcalendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php index ea98d6f4..3d9be7af 100644 --- a/plugins/libcalendaring/libvcalendar.php +++ b/plugins/libcalendaring/libvcalendar.php @@ -292,7 +292,7 @@ class libvcalendar implements Iterator $this->method = strval($vobject->METHOD); $this->agent = strval($vobject->PRODID); - foreach ($vobject->getBaseComponents() as $ve) { + foreach ($vobject->getBaseComponents() ?: $vobject->getComponents() as $ve) { if ($ve->name == 'VEVENT' || $ve->name == 'VTODO') { // convert to hash array representation $object = $this->_to_array($ve); @@ -424,7 +424,7 @@ class libvcalendar implements Iterator break; case 'RECURRENCE-ID': - // $event['recurrence_id'] = self::convert_datetime($prop); + $event['recurrence_date'] = self::convert_datetime($prop); break; case 'RELATED-TO':