Expose URI attachments as 'links' for event objects
This commit is contained in:
parent
032353e221
commit
ef30be7dea
1 changed files with 10 additions and 0 deletions
|
@ -86,6 +86,13 @@ class kolab_format_event extends kolab_format_xcal
|
|||
$attach->setUri('cid:' . $cid, $attr['mimetype']);
|
||||
$vattach->push($attach);
|
||||
}
|
||||
|
||||
foreach ((array)$object['links'] as $link) {
|
||||
$attach = new Attachment;
|
||||
$attach->setUri($link, null);
|
||||
$vattach->push($attach);
|
||||
}
|
||||
|
||||
$this->obj->setAttachments($vattach);
|
||||
|
||||
// cache this data
|
||||
|
@ -154,6 +161,9 @@ class kolab_format_event extends kolab_format_xcal
|
|||
'content' => $data,
|
||||
);
|
||||
}
|
||||
else if (substr($attach->uri(), 0, 4) == 'http') {
|
||||
$object['links'][] = $attach->uri();
|
||||
}
|
||||
}
|
||||
|
||||
// merge with additional data, e.g. attachments from the message
|
||||
|
|
Loading…
Add table
Reference in a new issue