Fix setting 'fileid' on file objects (Bifrost#T227815)
This commit is contained in:
parent
43d2b00e96
commit
6ba9838467
1 changed files with 5 additions and 8 deletions
|
@ -61,15 +61,12 @@ class kolab_storage_cache_file extends kolab_storage_cache
|
|||
{
|
||||
$object = parent::_unserialize($sql_arr);
|
||||
|
||||
if ($object && $sql_arr['fast-mode']) {
|
||||
if (!empty($object['_attachments'])) {
|
||||
$file = $object['_attachments'][key($object['_attachments'])];
|
||||
if ($object && !empty($object['_attachments'])) {
|
||||
$file = $object['_attachments'][key($object['_attachments'])];
|
||||
|
||||
$object['type'] = $file['mimetype'];
|
||||
$object['size'] = $file['size'];
|
||||
$object['fileid'] = $file['id'];
|
||||
$object['filename'] = $file['name'];
|
||||
}
|
||||
$object['type'] = $file['mimetype'];
|
||||
$object['size'] = $file['size'];
|
||||
$object['fileid'] = $file['id'];
|
||||
}
|
||||
|
||||
return $object;
|
||||
|
|
Loading…
Add table
Reference in a new issue