summaryrefslogtreecommitdiff
path: root/plugins/libkolab
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/libkolab')
-rw-r--r--plugins/libkolab/lib/kolab_storage_cache.php7
-rw-r--r--plugins/libkolab/lib/kolab_storage_folder.php5
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php
index 42321c5..4a1746b 100644
--- a/plugins/libkolab/lib/kolab_storage_cache.php
+++ b/plugins/libkolab/lib/kolab_storage_cache.php
@@ -359,11 +359,12 @@ class kolab_storage_cache
*
* @param string Entry's IMAP message UID
* @param string Entry's Object UID
- * @param string Target IMAP folder to move it to
+ * @param object kolab_storage_folder Target storage folder instance
*/
- public function move($msguid, $uid, $target_folder)
+ public function move($msguid, $uid, $target)
{
- $target = kolab_storage::get_folder($target_folder);
+ // clear cached uid mapping and force new lookup
+ unset($target->cache->uid2msg[$uid]);
// resolve new message UID in target folder
if ($new_msguid = $target->cache->uid2msguid($uid)) {
diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index df92a6e..e6a0d9e 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -933,9 +933,12 @@ class kolab_storage_folder
*/
public function move($uid, $target_folder)
{
+ if (is_string($target_folder))
+ $target_folder = kolab_storage::get_folder($target_folder);
+
if ($msguid = $this->cache->uid2msguid($uid)) {
$this->cache->bypass(true);
- $result = $this->imap->move_message($msguid, $target_folder, $this->name);
+ $result = $this->imap->move_message($msguid, $target_folder->name, $this->name);
$this->cache->bypass(false);
if ($result) {