plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Thu Feb 26 15:24:28 CET 2015
plugins/calendar/drivers/kolab/kolab_calendar.php | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
New commits:
commit c19bd982334f123d003bab826238548d57b11c84
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Thu Feb 26 15:24:22 2015 +0100
Fix attachment retrieval with direct instance identifiers (#4722)
diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php
index bfdaf7b..6458d05 100644
--- a/plugins/calendar/drivers/kolab/kolab_calendar.php
+++ b/plugins/calendar/drivers/kolab/kolab_calendar.php
@@ -221,7 +221,20 @@ class kolab_calendar extends kolab_storage_folder_api
*/
public function get_attachment_body($id, $event)
{
- return $this->ready ? $this->storage->get_attachment($event['id'], $id): false;
+ if (!$this->ready)
+ return false;
+
+ $data = $this->storage->get_attachment($event['id'], $id);
+
+ if ($data == null) {
+ // try again with master UID
+ $uid = preg_replace('/-\d+(T\d{6})?$/', '', $event['id']);
+ if ($uid != $event['id']) {
+ $data = $this->storage->get_attachment($uid, $id);
+ }
+ }
+
+ return $data;
}
/**
More information about the commits
mailing list