summaryrefslogtreecommitdiff
path: root/lib/kolab_sync_data_email.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-02-13 18:13:41 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-02-13 18:13:41 (GMT)
commit03f6485124f4529badf197d4d8da587b9d8f94ac (patch)
tree9e4072733458acd4a872f6993ffabbcf65010c93 /lib/kolab_sync_data_email.php
parentd1762544b24e10e9fcfee1cd2b73467143309f4d (diff)
downloadkolab-syncroton-03f6485124f4529badf197d4d8da587b9d8f94ac.tar.gz
Fix invalid email message identifier in Move response (Bug #2845)
Diffstat (limited to 'lib/kolab_sync_data_email.php')
-rw-r--r--lib/kolab_sync_data_email.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index 7191510..5ccd031 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);
}
}