Commit 98d57034 authored by skummer's avatar skummer

ZP-220 #comment reset filtertype when reading the options block on the correct CPO # time 1h

git-svn-id: https://z-push.org/svn/z-push/trunk@1440 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 641a4a6a
...@@ -235,19 +235,29 @@ class Sync extends RequestProcessor { ...@@ -235,19 +235,29 @@ class Sync extends RequestProcessor {
$spa->SetTruncation(SYNC_TRUNCATION_ALL); $spa->SetTruncation(SYNC_TRUNCATION_ALL);
while(self::$decoder->getElementStartTag(SYNC_OPTIONS)) { while(self::$decoder->getElementStartTag(SYNC_OPTIONS)) {
// set to synchronize all changes. The mobile could overwrite this value $firstOption = true;
$spa->SetFilterType(SYNC_FILTERTYPE_ALL);
while(1) { while(1) {
// foldertype definition
if(self::$decoder->getElementStartTag(SYNC_FOLDERTYPE)) { if(self::$decoder->getElementStartTag(SYNC_FOLDERTYPE)) {
$foldertype = self::$decoder->getElementContent(); $foldertype = self::$decoder->getElementContent();
ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): specified options block with foldertype '%s'", $foldertype)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): specified options block with foldertype '%s'", $foldertype));
// switch the foldertype for the next options // switch the foldertype for the next options
$spa->UseCPO($foldertype); $spa->UseCPO($foldertype);
// set to synchronize all changes. The mobile could overwrite this value
$spa->SetFilterType(SYNC_FILTERTYPE_ALL);
if(!self::$decoder->getElementEndTag()) if(!self::$decoder->getElementEndTag())
return false; return false;
}
// if no foldertype is defined, use default cpo
else if ($firstOption){
$spa->UseCPO();
// set to synchronize all changes. The mobile could overwrite this value
$spa->SetFilterType(SYNC_FILTERTYPE_ALL);
} }
$firstOption = false;
if(self::$decoder->getElementStartTag(SYNC_FILTERTYPE)) { if(self::$decoder->getElementStartTag(SYNC_FILTERTYPE)) {
$spa->SetFilterType(self::$decoder->getElementContent()); $spa->SetFilterType(self::$decoder->getElementContent());
......
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