summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-11-08 13:03:06 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-11-08 13:03:06 (GMT)
commit6d75fdd5f317d33d4f42208397de21e7fce47aed (patch)
tree39e6be59301dc17c73b8ceca43bc54444d1e6b15
parentd98e8787c6b74bf26e9eec8df807435d455af990 (diff)
downloadroundcubemail-plugins-kolab-6d75fdd5f317d33d4f42208397de21e7fce47aed.tar.gz
Quote object UID for IMAP SEARCH command; read generated UID from XMLObject if we're working with libkolab bindings
-rw-r--r--plugins/libkolab/lib/kolab_format.php2
-rw-r--r--plugins/libkolab/lib/kolab_storage_cache.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/libkolab/lib/kolab_format.php b/plugins/libkolab/lib/kolab_format.php
index c54558e..a414781 100644
--- a/plugins/libkolab/lib/kolab_format.php
+++ b/plugins/libkolab/lib/kolab_format.php
@@ -265,7 +265,7 @@ abstract class kolab_format
{
// get generated UID
if (!$this->data['uid']) {
- $this->data['uid'] = kolabformat::getSerializedUID();
+ $this->data['uid'] = $this->xmlobject ? $this->xmlobject->getSerializedUID() : kolabformat::getSerializedUID();
$this->obj->setUid($this->data['uid']);
}
}
diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php
index a800e58..cdb373f 100644
--- a/plugins/libkolab/lib/kolab_storage_cache.php
+++ b/plugins/libkolab/lib/kolab_storage_cache.php
@@ -717,7 +717,7 @@ class kolab_storage_cache
{
if (!isset($this->uid2msg[$uid])) {
// use IMAP SEARCH to get the right message
- $index = $this->imap->search_once($this->folder->name, ($deleted ? '' : 'UNDELETED ') . 'HEADER SUBJECT ' . $uid);
+ $index = $this->imap->search_once($this->folder->name, ($deleted ? '' : 'UNDELETED ') . 'HEADER SUBJECT "' . $uid. '"');
$results = $index->get();
$this->uid2msg[$uid] = $results[0];
}