diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-05-05 20:26:07 +0400 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-05 20:26:13 +0400 |
commit | 2facf509cc172ab822f573f3b582caef59995dc1 (patch) | |
tree | f1fd342291a90ac9b625729844f6448743e74696 /apps/calendar | |
parent | d46bea8867593399c04ea18bb6ad090aa2a258f2 (diff) | |
parent | 2092caf6d3be26dbb009c2f6585212841f5c823a (diff) |
Merge branch 'tasks' for Tasks app
Diffstat (limited to 'apps/calendar')
-rwxr-xr-x | apps/calendar/lib/app.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index eb440b5794b..8cbef4646fc 100755 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -179,7 +179,7 @@ class OC_Calendar_App{ foreach($events as $event) { $vobject = OC_VObject::parse($event['calendardata']); if(!is_null($vobject)) { - $vcategories->loadFromVObject($vobject->VEVENT, true); + self::loadCategoriesFromVCalendar($vobject); } } } @@ -190,7 +190,16 @@ class OC_Calendar_App{ * @see OC_VCategories::loadFromVObject */ public static function loadCategoriesFromVCalendar(OC_VObject $calendar) { - self::getVCategories()->loadFromVObject($calendar->VEVENT, true); + $object = null; + if (isset($calendar->VEVENT)) { + $object = $calendar->VEVENT; + } else + if (isset($calendar->VTODO)) { + $object = $calendar->VTODO; + } + if ($object) { + self::getVCategories()->loadFromVObject($object, true); + } } public static function getRepeatOptions(){ |