diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php index 4c822f6e..be94bb87 100644 --- a/plugins/libkolab/lib/kolab_storage_cache.php +++ b/plugins/libkolab/lib/kolab_storage_cache.php @@ -29,6 +29,7 @@ class kolab_storage_cache private $folder; private $uid2msg; private $objects; + private $index = array(); private $resource_uri; private $enabled = true; private $synched = false; @@ -422,7 +423,7 @@ class kolab_storage_cache private function _serialize($object) { $bincols = array_flip($this->binary_cols); - $sql_data = array('dtstart' => null, 'dtend' => null, 'xml' => ''); + $sql_data = array('dtstart' => null, 'dtend' => null, 'xml' => '', 'tags' => '', 'words' => ''); // set type specific values if ($this->folder->type == 'event') { diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php index 7ae1a1eb..6c4b4010 100644 --- a/plugins/libkolab/lib/kolab_storage_folder.php +++ b/plugins/libkolab/lib/kolab_storage_folder.php @@ -271,7 +271,8 @@ class kolab_storage_folder { if (!$type) $type = $this->type; - // TODO: synchronize cache first? + // synchronize cache first + $this->cache->synchronize(); return $this->cache->count(array(array('type','=',$type))); } @@ -625,6 +626,7 @@ class kolab_storage_folder $format->set($object); $xml = $format->write(); $object['uid'] = $format->uid; // get read UID from format + $object['_formatobj'] = $format; if (!$format->is_valid() || empty($object['uid'])) { return false;