summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-02-27 16:06:15 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-02-27 16:06:15 (GMT)
commit54b6c137fc5d28422a603818b6739359ff651ccd (patch)
treeb53b10867c5a56a065a51f6817d7520adeebd850
parentb298aebcd504977fe987372f5b482861436f31a6 (diff)
downloadiRony-54b6c137fc5d28422a603818b6739359ff651ccd.tar.gz
Read/save ATTACH (uri) properties to Kolab backend
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index 3eaec4a..1d002df 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -653,6 +653,12 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
}
break;
+ case 'ATTACH':
+ if (substr($prop->value, 0, 4) == 'http') {
+ $event['links'][] = $prop->value;
+ }
+ break;
+
default:
if (substr($prop->name, 0, 2) == 'X-')
$event['x-custom'][] = array($prop->name, strval($prop->value));
@@ -805,6 +811,10 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
$ve->add('ATTENDEE', 'mailto:' . $attendee['email'], self::_map_keys($attendee, $this->attendee_keymap));
}
+ foreach ((array)$event['links'] as $uri) {
+ $ve->add('ATTACH', $uri);
+ }
+
// add custom properties
foreach ((array)$event['x-custom'] as $prop) {
$ve->add($prop[0], $prop[1]);