Quote object UID for IMAP SEARCH command; read generated UID from XMLObject if we're working with libkolab bindings
This commit is contained in:
parent
d98e8787c6
commit
6d75fdd5f3
2 changed files with 2 additions and 2 deletions
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue