Merge branch 'master' of http://git.tine20.org/git/Syncope
authorLars Kneschke <l.kneschke@metaways.de>
Thu, 1 Mar 2012 14:28:42 +0000 (15:28 +0100)
committerLars Kneschke <l.kneschke@metaways.de>
Thu, 1 Mar 2012 14:28:42 +0000 (15:28 +0100)
1  2 
tine20/library/Syncope/lib/Syncope/Command/Sync.php
tine20/library/Syncope/tests/Syncope/Command/SyncTests.php

@@@ -370,12 -370,7 +370,7 @@@ class Syncope_Command_Sync extends Sync
                  $collection = $collections->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Collection'));
                  $collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'SyncKey', 0));
                  $collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'CollectionId', $collectionData['collectionId']));
-                 /**
-                  * i would expect to send STATUS_FOLDER_HIERARCHY_HAS_CHANGED but by reading the source code of Android I found out
-                  * that android triggers the FolderSync only on STATUS_OBJECT_NOT_FOUND
-                  */
-                 #$collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_FOLDER_HIERARCHY_HAS_CHANGED));
-                 $collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_OBJECT_NOT_FOUND));
+                 $collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_FOLDER_HIERARCHY_HAS_CHANGED));
  
              // invalid synckey provided
              } elseif (! ($collectionData['syncState'] instanceof Syncope_Model_ISyncState)) {
                  $collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'CollectionId', $collectionData['collectionId']));
                  $collection->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_INVALID_SYNC_KEY));
                  
              // initial sync
              } elseif ($collectionData['syncState']->counter === 0) {
                  $collectionData['syncState']->counter++;
@@@ -86,7 -86,7 +86,7 @@@ class Syncope_Command_SyncTests extend
          
          $nodes = $xpath->query('//AirSync:Sync/AirSync:Collections/AirSync:Collection/AirSync:Status');
          $this->assertEquals(1, $nodes->length, $syncDoc->saveXML());
-         $this->assertEquals(Syncope_Command_Sync::STATUS_OBJECT_NOT_FOUND, $nodes->item(0)->nodeValue, $syncDoc->saveXML());
+         $this->assertEquals(Syncope_Command_Sync::STATUS_FOLDER_HIERARCHY_HAS_CHANGED, $nodes->item(0)->nodeValue, $syncDoc->saveXML());
      }
      
      /**
          
          $nodes = $xpath->query('//AirSync:Sync/AirSync:Collections/AirSync:Collection/AirSync:Status');
          $this->assertEquals(1, $nodes->length, $syncDoc->saveXML());
-         $this->assertEquals(Syncope_Command_Sync::STATUS_OBJECT_NOT_FOUND, $nodes->item(0)->nodeValue, $syncDoc->saveXML());
+         $this->assertEquals(Syncope_Command_Sync::STATUS_FOLDER_HIERARCHY_HAS_CHANGED, $nodes->item(0)->nodeValue, $syncDoc->saveXML());
      }
      
      /**