2 commits - plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Wed Feb 27 17:10:31 CET 2013
plugins/libkolab/lib/kolab_format_event.php | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 982b6e98190a55c2d9e5057bb091a8bb606f098e
Merge: ef30be7 b153482
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Feb 27 17:07:00 2013 +0100
Merge branch 'master' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab
commit ef30be7dea950459bb3c68839285b31ebae140a3
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Feb 27 17:05:10 2013 +0100
Expose URI attachments as 'links' for event objects
diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php
index 6b1db88..cd357fc 100644
--- a/plugins/libkolab/lib/kolab_format_event.php
+++ b/plugins/libkolab/lib/kolab_format_event.php
@@ -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
More information about the commits
mailing list