From bab825f71a72207aa11155709fa3242585c1db65 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 22 Apr 2010 09:55:22 -0400 Subject: [PATCH] clarify what this does --- framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php b/framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php index 71e7140dd..1fbc84927 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php @@ -106,10 +106,15 @@ class Horde_ActiveSync_Connector_Importer /* Check for conflicts */ $conflict = $this->_isConflict('change', $this->_folderId, $id); - /* Update client state */ + /* Update client state before we attempt to save changes, so we + * have a record of the change. This way, if the server change fails + * the server copy will be re-sync'd back to the PIM, maintaining + * at least some sort of consistency. */ $change = array(); $change['id'] = $id; - $change['mod'] = 0; // dummy, will be updated later if the change succeeds + // mod is 0 to force a re-synch in the case of server failure. This + // is updated after the change succeeds in the next updateState() + $change['mod'] = 0; $change['parent'] = $this->_folderId; $change['flags'] = (isset($message->read)) ? $message->read : 0; $this->_state->updateState('change', $change); -- 2.11.0