Commit 6a3ad229 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #226 in ZP/z-push from...

Merge pull request #226 in ZP/z-push from bugfix/ZP-921-move-causes-duplicates-in-destination to develop

* commit 'cbd2ca5c':
  ZP-921 Set short folderid prefix to the destination folder in MoveItems reponse.
parents 37f038eb cbd2ca5c
......@@ -609,8 +609,15 @@ class ImportChangesICS implements IImportChanges {
throw new StatusException(sprintf("ImportChangesICS->ImportMessageMove('%s','%s'): Error, delete of source message failed: 0x%X. Possible duplicates.", $sk, $newfolder, mapi_last_hresult()), SYNC_MOVEITEMSSTATUS_SOURCEORDESTLOCKED);
$sourcekeyprops = mapi_getprops($newmessage, array (PR_SOURCE_KEY));
if (isset($sourcekeyprops[PR_SOURCE_KEY]) && $sourcekeyprops[PR_SOURCE_KEY])
return $this->prefix . bin2hex($sourcekeyprops[PR_SOURCE_KEY]);
if (isset($sourcekeyprops[PR_SOURCE_KEY]) && $sourcekeyprops[PR_SOURCE_KEY]) {
$prefix = "";
// prepend the destination short folderid, if it exists
$destShortId = ZPush::GetDeviceManager()->GetFolderIdForBackendId($newfolder);
if ($destShortId !== $newfolder) {
$prefix = $destShortId .":";
}
return $prefix . bin2hex($sourcekeyprops[PR_SOURCE_KEY]);
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment