Merge branch 'dev/kolab3' of ssh://git.kolabsys.com/git/roundcube into dev/kolab3

This commit is contained in:
Thomas Bruederli 2012-05-15 19:08:16 +02:00
commit dadf00f1a6

View file

@ -82,7 +82,8 @@ class kolab_storage_cache
return;
// lock synchronization for this folder or wait if locked
$this->_sync_lock();
if (!$this->_sync_lock())
return;
// synchronize IMAP mailbox cache
$this->imap->folder_sync($this->folder->name);
@ -186,7 +187,7 @@ class kolab_storage_cache
kolab_storage::get_folder($foldername)->cache->set($msguid, $object);
return;
}
// write to cache
if ($this->ready) {
// remove old entry
@ -305,7 +306,7 @@ class kolab_storage_cache
$filter = $this->_query2assoc($query);
// use 'list' for folder's default objects
if ($filter['type'] == $this->type) {
if ($filter['type'] == $this->type && !empty($this->index)) {
$index = $this->index;
}
else { // search by object type
@ -488,7 +489,7 @@ class kolab_storage_cache
private function _sync_lock()
{
if (!$this->ready)
return;
return false;
$sql_arr = $this->db->fetch_assoc($this->db->query(
"SELECT msguid AS locked FROM kolab_cache ".
@ -522,6 +523,8 @@ class kolab_storage_cache
'lock'
);
}
return true;
}
/**