Commit 35683fee authored by skummer's avatar skummer

ZP-433 #comment setup the folder correctly before exporting changes from it...

ZP-433 #comment setup the folder correctly before exporting changes from it and reset $status when processes several folders #time 1h

git-svn-id: https://z-push.org/svn/z-push/trunk@1692 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 36b08613
......@@ -665,6 +665,10 @@ class Sync extends RequestProcessor {
if($status == SYNC_STATUS_SUCCESS) {
try {
// if this is an additional folder the backend has to be setup correctly
if (!self::$backend->Setup(ZPush::GetAdditionalSyncFolderStore($spa->GetFolderId())))
throw new StatusException(sprintf("HandleSync() could not Setup() the backend for folder id '%s'", $spa->GetFolderId()), SYNC_STATUS_FOLDERHIERARCHYCHANGED);
// Use the state from the importer, as changes may have already happened
$exporter = self::$backend->GetExporter($spa->GetFolderId());
......@@ -940,6 +944,9 @@ class Sync extends RequestProcessor {
ZLog::Write(LOGLEVEL_ERROR, sprintf("HandleSync(): error saving '%s' - no state information available", $spa->GetNewSyncKey()));
}
// reset status for the next folder
$status = SYNC_STATUS_SUCCESS;
// save SyncParameters
if ($status == SYNC_STATUS_SUCCESS && empty($actiondata["fetchids"]))
$sc->SaveCollection($spa);
......
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