Commit 90905177 authored by Sebastian Kummer's avatar Sebastian Kummer

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

Merge pull request #256 in ZP/z-push from bugfix/ZP-947-on-exporter-failure-outlook-does-not to develop

* commit 'dc281f2d':
  ZP-947 Fixed typo.
  ZP-947 Send global status code if no output was generated yet in case of a SYNC_STATUS_FOLDERHIERARCHYCHANGED. Additional log when opening folder entry.
parents c74c9c6e dc281f2d
......@@ -92,15 +92,19 @@ class ExportChangesICS implements IExportChanges{
}
$folder = false;
if ($entryid)
if ($entryid) {
$folder = mapi_msgstore_openentry($this->store, $entryid);
ZLog::Write(LOGLEVEL_WARN, sprintf("ExportChangesICS(): Error, mapi_msgstore_openentry() failed: 0x%08X", mapi_last_hresult()));
}
// Get the actual ICS exporter
if($folderid) {
if ($folder)
if ($folder) {
$this->exporter = mapi_openproperty($folder, PR_CONTENTS_SYNCHRONIZER, IID_IExchangeExportChanges, 0 , 0);
else
}
else {
$this->exporter = false;
}
}
else {
$this->exporter = mapi_openproperty($folder, PR_HIERARCHY_SYNCHRONIZER, IID_IExchangeExportChanges, 0 , 0);
......
......@@ -886,6 +886,15 @@ class Sync extends RequestProcessor {
continue;
}
// if there are no other responses sent, we should end with a global status
if ($status == SYNC_STATUS_FOLDERHIERARCHYCHANGED && $this->startTagsSent === false) {
$this->sendStartTags();
self::$encoder->startTag(SYNC_STATUS);
self::$encoder->content($status);
self::$encoder->endTag();
return true;
}
// there is something to send here, sync folder to output
$this->syncFolder($sc, $spa, $exporter, $changecount, $streamimporter, $status, $newFolderStat);
......
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