Fixed setting mimetype of attachments on create/update event (#244)
This commit is contained in:
parent
7e3a88996f
commit
159d672a1d
1 changed files with 8 additions and 3 deletions
|
@ -289,6 +289,7 @@ class kolab_calendar
|
|||
$old = $this->storage->getObject($event['id']);
|
||||
$object = array_merge($old, $this->_from_rcube_event($event));
|
||||
$saved = $this->storage->save($object, $event['id']);
|
||||
|
||||
if (PEAR::isError($saved)) {
|
||||
raise_error(array(
|
||||
'code' => 600, 'type' => 'php',
|
||||
|
@ -711,6 +712,10 @@ class kolab_calendar
|
|||
$attachment['name'] = basename($filename, $ext) . '-' . $collisions[$filename] . $ext;
|
||||
}
|
||||
|
||||
// set type parameter
|
||||
if ($attachment['mimetype'])
|
||||
$attachment['type'] = $attachment['mimetype'];
|
||||
|
||||
$object['_attachments'][$attachment['name']] = $attachment;
|
||||
unset($event['attachments'][$idx]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue