use correct variable: $folder instead of $folderId
[tine20] / tine20 / Felamimail / Frontend / ActiveSync.php
index 338fa2a..66836e2 100644 (file)
@@ -525,10 +525,15 @@ class Felamimail_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implem
         if (isset($store->options['range'])) {
             $pagination = new Tinebase_Model_Pagination(array(
                 'start' => $store->options['range'][0],
-                'limit' => $store->options['range'][1] - $store->options['range'][0]
+                'limit' => $store->options['range'][1] - $store->options['range'][0],
+                'sort' => $this->_sortField,
+                'dir' => 'DESC',
             ));
         } else {
-            $pagination = null;
+            $pagination = new Tinebase_Model_Pagination(array(
+                'sort' => $this->_sortField,
+                'dir' => 'DESC',
+            ));
         }
         
         $serverIds = $this->_contentController->search($filter, $pagination, false, true, 'sync');
@@ -764,7 +769,7 @@ class Felamimail_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implem
      */
     public function updateFolder(Syncroton_Model_IFolder $folder)
     {
-        if (strpos($folderId, $this->_fakePrefix) === 0) {
+        if (strpos($folder->serverId, $this->_fakePrefix) === 0) {
             return $folder;
         }