Return the most recent message UID in case there are duplicates
This commit is contained in:
parent
f715264956
commit
18a106538b
1 changed files with 2 additions and 2 deletions
|
@ -917,7 +917,7 @@ class kolab_storage_cache
|
|||
|
||||
$sql_result = $this->db->query(
|
||||
"SELECT msguid FROM $this->cache_table ".
|
||||
"WHERE folder_id=? AND uid=?",
|
||||
"WHERE folder_id=? AND uid=? ORDER BY msguid DESC",
|
||||
$this->folder_id,
|
||||
$uid
|
||||
);
|
||||
|
@ -932,7 +932,7 @@ class kolab_storage_cache
|
|||
$index = $this->imap->search_once($this->folder->name, ($deleted ? '' : 'UNDELETED ') .
|
||||
'HEADER SUBJECT ' . rcube_imap_generic::escape($uid));
|
||||
$results = $index->get();
|
||||
$this->uid2msg[$uid] = $results[0];
|
||||
$this->uid2msg[$uid] = end($results);
|
||||
}
|
||||
|
||||
return $this->uid2msg[$uid];
|
||||
|
|
Loading…
Add table
Reference in a new issue