Commit 2b5c898e authored by Sebastian Kummer's avatar Sebastian Kummer

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.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 6e7e6594
......@@ -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