Commit 1e545605 authored by Manfred Kutas's avatar Manfred Kutas

ZP-989 Backward compatibility fixes for old style folder ids.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 21e6fd03
...@@ -453,17 +453,16 @@ class ReplyBackImExporter implements IImportChanges, IExportChanges { ...@@ -453,17 +453,16 @@ class ReplyBackImExporter implements IImportChanges, IExportChanges {
$sourcekey = hex2bin($sk); $sourcekey = hex2bin($sk);
$parentsourcekey = hex2bin(ZPush::GetDeviceManager()->GetBackendIdForFolderId($fsk)); $parentsourcekey = hex2bin(ZPush::GetDeviceManager()->GetBackendIdForFolderId($fsk));
// Backwards compatibility for old style folder ids
if (empty($parentsourcekey)) {
$parentsourcekey = $this->folderid;
}
$entryid = mapi_msgstore_entryidfromsourcekey($this->store, $parentsourcekey, $sourcekey); $entryid = mapi_msgstore_entryidfromsourcekey($this->store, $parentsourcekey, $sourcekey);
if(!$entryid) { if(!$entryid) {
ZLog::Write(LOGLEVEL_INFO, sprintf("ReplyBackImExporter->getMessage(): Couldn't retrieve message from MAPIProvider, sourcekey: '%s', parentsourcekey: '%s'", bin2hex($sourcekey), bin2hex($parentsourcekey), bin2hex($entryid))); ZLog::Write(LOGLEVEL_INFO, sprintf("ReplyBackImExporter->getMessage(): Couldn't retrieve message from MAPIProvider, sourcekey: '%s', parentsourcekey: '%s'", bin2hex($sourcekey), bin2hex($parentsourcekey), bin2hex($entryid)));
if ($announceErrors) {
return $status;
}
else {
return false; return false;
} }
}
$mapimessage = mapi_msgstore_openentry($this->store, $entryid); $mapimessage = mapi_msgstore_openentry($this->store, $entryid);
try { try {
...@@ -484,8 +483,7 @@ class ReplyBackImExporter implements IImportChanges, IExportChanges { ...@@ -484,8 +483,7 @@ class ReplyBackImExporter implements IImportChanges, IExportChanges {
} }
ZPush::GetDeviceManager()->AnnounceIgnoredMessage(false, $brokenSO->id, $brokenSO); ZPush::GetDeviceManager()->AnnounceIgnoredMessage(false, $brokenSO->id, $brokenSO);
} }
// tell MAPI to ignore the message return false;
return $status;
} }
} }
return $message; return $message;
......
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