Fix attachment display when saving a new event (#1024)
This commit is contained in:
parent
192bd3942c
commit
4188f1029e
1 changed files with 4 additions and 2 deletions
|
@ -288,7 +288,7 @@ class kolab_calendar
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$event['id'] = $event['uid'];
|
$event['id'] = $event['uid'];
|
||||||
$this->events[$event['uid']] = $event;
|
$this->events[$event['uid']] = $this->_to_rcube_event($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $saved;
|
return $saved;
|
||||||
|
@ -424,13 +424,15 @@ class kolab_calendar
|
||||||
if ($record['end'] <= $record['start'] && $record['allday']) {
|
if ($record['end'] <= $record['start'] && $record['allday']) {
|
||||||
$record['end'] = clone $record['start'];
|
$record['end'] = clone $record['start'];
|
||||||
$record['end']->add(new DateInterval('PT1H'));
|
$record['end']->add(new DateInterval('PT1H'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($record['_attachments'])) {
|
if (!empty($record['_attachments'])) {
|
||||||
foreach ($record['_attachments'] as $key => $attachment) {
|
foreach ($record['_attachments'] as $key => $attachment) {
|
||||||
if ($attachment !== false) {
|
if ($attachment !== false) {
|
||||||
if (!$attachment['name'])
|
if (!$attachment['name'])
|
||||||
$attachment['name'] = $key;
|
$attachment['name'] = $key;
|
||||||
|
|
||||||
|
unset($attachment['path'], $attachment['content']);
|
||||||
$attachments[] = $attachment;
|
$attachments[] = $attachment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue