Commit 55edf8a1 authored by Sebastian Kummer's avatar Sebastian Kummer

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

Merge pull request #177 in ZP/z-push from bugfix/ZP-842-outlook-via-as-does-not-synchronize to develop

* commit '2b5c898e':
  ZP-842 Check if a folders parent ID is known on the mobile. If not, the folder is ignored and not synchronized to the device.

(cherry picked from commit ff984d6f)
parent f314235d
......@@ -228,6 +228,12 @@ class ChangesMemoryWrapper extends HierarchyCache implements IImportChanges, IEx
return false;
}
// check if the parent ID is known on the device
if (!isset($folder->parentid) || $folder->parentid != "0" && !$this->GetFolder($folder->parentid)) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ChangesMemoryWrapper->ImportFolderChange(): Change for folder '%s' will not be sent as parent folder is not set or not known on mobile.", $folder->displayname));
return false;
}
// load this change into memory
$this->changes[] = array(self::CHANGE, $folder);
......
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