Fixed working with disabled kolab_cache
This commit is contained in:
parent
d9924e675d
commit
d08cb11137
1 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
|
@ -303,7 +304,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
|
||||
|
@ -483,7 +484,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 ".
|
||||
|
@ -517,6 +518,8 @@ class kolab_storage_cache
|
|||
'lock'
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue