summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-09-04 15:35:50 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-09-04 15:35:50 (GMT)
commit049941ee190d83d3975aa883e6e7dc88c34be736 (patch)
tree1ae0c4a11b3c11eabf7d0f88585033eba3800dcf
parent1b3d45fd92e622efe66fabf111da1d79a8826798 (diff)
downloadiRony-049941ee190d83d3975aa883e6e7dc88c34be736.tar.gz
Unset mapped attachments list to avoid being written to cache
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index c151940..4b4a3c1 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -284,7 +284,7 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
$events[] = array(
'id' => $event['uid'],
'uri' => $event['uid'] . '.ics',
- 'lastmodified' => $event['changed']->format('U'),
+ 'lastmodified' => $event['changed'] ? $event['changed']->format('U') : null,
'calendarid' => $calendarId,
'etag' => self::_get_etag($event),
'size' => $event['_size'],
@@ -396,6 +396,7 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
// map attachments attribute
$object['_attachments'] = $object['attachments'];
+ unset($object['attachments']);
$success = $storage->save($object, $object['_type']);
if (!$success) {
@@ -466,6 +467,7 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
// process attachments
if (/* user agent known to handle attachments inline */ !empty($object['attachments'])) {
$object['_attachments'] = $object['attachments'];
+ unset($object['attachments']);
// mark all existing attachments as deleted (update is always absolute)
foreach ($old['_attachments'] as $key => $attach) {