Class constant, add method for retrieving the currently loaded synckey
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 12 Apr 2010 17:40:13 +0000 (13:40 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 12 Apr 2010 17:44:44 +0000 (13:44 -0400)
framework/ActiveSync/lib/Horde/ActiveSync/State/Base.php
framework/ActiveSync/lib/Horde/ActiveSync/State/File.php

index 814ccd5..5387691 100644 (file)
@@ -110,6 +110,16 @@ abstract class Horde_ActiveSync_State_Base
     }
 
     /**
+     * Get the current synckey
+     *
+     * @return string  The synkey we last retrieved state for
+     */
+    public function getCurrentSyncKey()
+    {
+        return $this->_syncKey;
+    }
+
+    /**
      * Generate a random 10 digit policy key
      *
      * @return unknown
index d4d437b..e78aea5 100644 (file)
@@ -584,7 +584,7 @@ class Horde_ActiveSync_State_File extends Horde_ActiveSync_State_Base
             /* do nothing if it is a dummy folder */
             if ($folderId != Horde_ActiveSync::FOLDER_TYPE_DUMMY) {
                 // on ping: check if backend supports alternative PING mechanism & use it
-                if ($this->_collection['class'] === false && $flags == BACKEND_DISCARD_DATA && $this->_backend->AlterPing()) {
+                if ($this->_collection['class'] === false && $flags == Horde_ActiveSync::BACKEND_DISCARD_DATA && $this->_backend->AlterPing()) {
                     //@TODO - look at the passing of syncstate here - should probably pass self??
                     // Not even sure if we need this AlterPing?
                     $this->_changes = $this->_backend->AlterPingChanges($folderId, $syncState);