Add workaround for situation when kolabobject doesn't generate UID but kolabformat does
(it's the case for File objects unsupported by libkolab)
This commit is contained in:
parent
ddeb606daf
commit
80cf13f4ad
1 changed files with 6 additions and 1 deletions
|
@ -265,7 +265,12 @@ abstract class kolab_format
|
|||
{
|
||||
// get generated UID
|
||||
if (!$this->data['uid']) {
|
||||
$this->data['uid'] = $this->xmlobject ? $this->xmlobject->getSerializedUID() : kolabformat::getSerializedUID();
|
||||
if ($this->xmlobject) {
|
||||
$this->data['uid'] = $this->xmlobject->getSerializedUID();
|
||||
}
|
||||
if (empty($this->data['uid'])) {
|
||||
$this->data['uid'] = kolabformat::getSerializedUID();
|
||||
}
|
||||
$this->obj->setUid($this->data['uid']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue