Accept parent-relation from RELATED-TO property without RELTYPE parameter (#4158)
This commit is contained in:
parent
ac4ed0ff19
commit
17f57ff7ca
3 changed files with 5 additions and 1 deletions
|
@ -453,7 +453,8 @@ class libvcalendar implements Iterator
|
|||
break;
|
||||
|
||||
case 'RELATED-TO':
|
||||
if ($prop->offsetGet('RELTYPE') == 'PARENT') {
|
||||
$reltype = $prop->offsetGet('RELTYPE');
|
||||
if ($reltype == 'PARENT' || $reltype === null) {
|
||||
$event['parent_id'] = $prop->value;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -322,6 +322,7 @@ class libvcalendar_test extends PHPUnit_Framework_TestCase
|
|||
$this->assertEquals('IN-PROCESS', $task['status'], "Task status property");
|
||||
$this->assertEquals(1, count($task['x-custom']), "Custom properties");
|
||||
$this->assertEquals(4, count($task['categories']));
|
||||
$this->assertEquals('1234567890-12345678-PARENT', $task['parent_id'], "Parent Relation");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,6 +31,8 @@ SEQUENCE:2
|
|||
CATEGORIES:Tag1,Tag2
|
||||
CATEGORIES:Tag3
|
||||
CATEGORIES:Tag4
|
||||
RELATED-TO:1234567890-12345678-PARENT
|
||||
RELATED-TO;RELTYPE=CHILD:1234567890-12345678-CHILD
|
||||
X-MOZ-GENERATION:1
|
||||
BEGIN:VALARM
|
||||
ACTION:DISPLAY
|
||||
|
|
Loading…
Add table
Reference in a new issue