From 158fa06a3cc926abffe1cbd9fabaa90638d4d082 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 20 Nov 2013 17:17:31 +0100 Subject: [PATCH] Fix moving of Kolab objects to other folders in cache (#2564) --- plugins/libkolab/lib/kolab_storage_cache.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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