Fix attachment display when saving a new event (#1024)

This commit is contained in:
Thomas Bruederli 2012-09-19 10:32:38 +02:00
parent 192bd3942c
commit 4188f1029e

View file

@ -288,7 +288,7 @@ class kolab_calendar
}
else {
$event['id'] = $event['uid'];
$this->events[$event['uid']] = $event;
$this->events[$event['uid']] = $this->_to_rcube_event($object);
}
return $saved;
@ -424,13 +424,15 @@ class kolab_calendar
if ($record['end'] <= $record['start'] && $record['allday']) {
$record['end'] = clone $record['start'];
$record['end']->add(new DateInterval('PT1H'));
}
}
if (!empty($record['_attachments'])) {
foreach ($record['_attachments'] as $key => $attachment) {
if ($attachment !== false) {
if (!$attachment['name'])
$attachment['name'] = $key;
unset($attachment['path'], $attachment['content']);
$attachments[] = $attachment;
}
}