diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php index 84cb2b0d..e8ceed1e 100644 --- a/plugins/libkolab/lib/kolab_storage_cache.php +++ b/plugins/libkolab/lib/kolab_storage_cache.php @@ -116,6 +116,15 @@ class kolab_storage_cache return in_array('type', $this->extra_cols); } + /** + * Getter for the numeric ID used in cache tables + */ + public function get_folder_id() + { + $this->_read_folder_data(); + return $this->folder_id; + } + /** * Synchronize local cache data with remote */ @@ -349,7 +358,7 @@ class kolab_storage_cache $this->db->query( "UPDATE $this->cache_table SET folder_id=?, msguid=? ". "WHERE folder_id=? AND msguid=?", - $target->folder_id, + $target->cache->get_folder_id(), $new_msguid, $this->folder_id, $msguid