plugins/libkolab
Aleksander Machniak
machniak at kolabsys.com
Wed Jan 16 10:08:13 CET 2013
plugins/libkolab/lib/kolab_format.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 80cf13f4adff3801fc685b69811b02c878ce267a
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Wed Jan 16 10:06:59 2013 +0100
Add workaround for situation when kolabobject doesn't generate UID but kolabformat does
(it's the case for File objects unsupported by libkolab)
diff --git a/plugins/libkolab/lib/kolab_format.php b/plugins/libkolab/lib/kolab_format.php
index d884207..b3bb4c4 100644
--- a/plugins/libkolab/lib/kolab_format.php
+++ b/plugins/libkolab/lib/kolab_format.php
@@ -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']);
}
}
More information about the commits
mailing list