Branch 'kolab-syncroton-2.2' - lib/kolab_sync_data_email.php
Aleksander Machniak
machniak at kolabsys.com
Thu Feb 13 19:17:35 CET 2014
lib/kolab_sync_data_email.php | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 92254d846b1a930c121e1c8ead4cc1f7c1649b2d
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Thu Feb 13 19:13:41 2014 +0100
Fix invalid email message identifier in Move response (Bug #2845)
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index f378eb3..205d3da 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -511,19 +511,20 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
*/
public function moveItem($srcFolderId, $serverId, $dstFolderId)
{
- $msg = $this->parseMessageId($serverId);
- $dest = $this->extractFolders($dstFolderId);
- $dstname = $this->backend->folder_id2name(array_shift($dest), $this->device->deviceid);
+ $msg = $this->parseMessageId($serverId);
+ $dest = $this->extractFolders($dstFolderId);
+ $dest_id = array_shift($dest);
+ $dest_name = $this->backend->folder_id2name($dest_id, $this->device->deviceid);
if (empty($msg)) {
throw new Syncroton_Exception_Status_MoveItems(Syncroton_Exception_Status_MoveItems::INVALID_SOURCE);
}
- if ($dstname === null) {
+ if ($dest_name === null) {
throw new Syncroton_Exception_Status_MoveItems(Syncroton_Exception_Status_MoveItems::INVALID_DESTINATION);
}
- if (!$this->storage->move_message($msg['uid'], $dstname, $msg['foldername'])) {
+ if (!$this->storage->move_message($msg['uid'], $dest_name, $msg['foldername'])) {
throw new Syncroton_Exception_Status_MoveItems(Syncroton_Exception_Status_MoveItems::INVALID_SOURCE);
}
@@ -531,7 +532,7 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
$copyuid = $this->storage->conn->data['COPYUID'];
if (is_array($copyuid) && ($uid = $copyuid[1])) {
- return $this->createMessageId($dstFolderId, $uid);
+ return $this->createMessageId($dest_id, $uid);
}
}
More information about the commits
mailing list