Commit 26e7c81a authored by mku's avatar mku

ZP-172 #comment Heartbeat sync fails on Android if all folders are disabled #time 30m

git-svn-id: https://z-push.org/svn/z-push/trunk@1380 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent b01c0cf8
...@@ -72,7 +72,11 @@ class Sync extends RequestProcessor { ...@@ -72,7 +72,11 @@ class Sync extends RequestProcessor {
} }
// Synching specified folders // Synching specified folders
if(self::$decoder->getElementStartTag(SYNC_FOLDERS)) { // Android still sends heartbeat sync even if all syncfolders are disabled.
// Check if Folders tag is empty (<Folders/>) and only sync if there are
// some folders in the request. See ZP-172
$startTag = self::$decoder->getElementStartTag(SYNC_FOLDERS);
if(isset($startTag[EN_FLAGS]) && $startTag[EN_FLAGS]) {
while(self::$decoder->getElementStartTag(SYNC_FOLDER)) { while(self::$decoder->getElementStartTag(SYNC_FOLDER)) {
$actiondata = array(); $actiondata = array();
$actiondata["requested"] = true; $actiondata["requested"] = true;
......
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