diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php index a45da6e2..3cb7826f 100644 --- a/plugins/libcalendaring/libvcalendar.php +++ b/plugins/libcalendaring/libvcalendar.php @@ -471,7 +471,7 @@ class libvcalendar implements Iterator case 'CATEGORY': case 'CATEGORIES': - $event['categories'] = $prop->getParts(); + $event['categories'] = array_merge((array)$event['categories'], $prop->getParts()); break; case 'CLASS': diff --git a/plugins/libcalendaring/tests/libvcalendar.php b/plugins/libcalendaring/tests/libvcalendar.php index f5c61f91..aa2c5680 100644 --- a/plugins/libcalendaring/tests/libvcalendar.php +++ b/plugins/libcalendaring/tests/libvcalendar.php @@ -321,6 +321,7 @@ class libvcalendar_test extends PHPUnit_Framework_TestCase $this->assertEquals('-1D:DISPLAY', $task['alarms'], "Taks alarm value"); $this->assertEquals('IN-PROCESS', $task['status'], "Task status property"); $this->assertEquals(1, count($task['x-custom']), "Custom properties"); + $this->assertEquals(4, count($task['categories'])); } /** diff --git a/plugins/libcalendaring/tests/resources/vtodo.ics b/plugins/libcalendaring/tests/resources/vtodo.ics index 95261420..0d4534c4 100644 --- a/plugins/libcalendaring/tests/resources/vtodo.ics +++ b/plugins/libcalendaring/tests/resources/vtodo.ics @@ -28,6 +28,9 @@ STATUS:IN-PROCESS DTSTART;TZID=Europe/Zurich:20130921T000000 DUE;VALUE=DATE:20130921 SEQUENCE:2 +CATEGORIES:Tag1,Tag2 +CATEGORIES:Tag3 +CATEGORIES:Tag4 X-MOZ-GENERATION:1 BEGIN:VALARM ACTION:DISPLAY