Skip to content

Commit

Permalink
Persist the haveInitialSync flag.
Browse files Browse the repository at this point in the history
The logic was broken, since count($messages) isn't an
indicator as to whether or not a folder was previously sync'd.
Fixes issue where we could still send the ADD command to OL as the
result of a MOVE operation.
  • Loading branch information
mrubinsk committed Mar 10, 2016
1 parent 92dffc7 commit 4fda33f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php
Expand Up @@ -451,6 +451,7 @@ public function serialize()
'c' => $this->_class,
'lsd' => $this->_lastSinceDate,
'sd' => $this->_softDelete,
'hi' => $this->haveInitialSync,
'v' => self::VERSION)
);
}
Expand All @@ -477,7 +478,7 @@ public function unserialize($data)
$this->_class = $d_data['c'];
$this->_lastSinceDate = $d_data['lsd'];
$this->_softDelete = $d_data['sd'];
$this->haveInitialSync = !empty($this->_messages);
$this->haveInitialSync = empty($d_data['hi']) ? !empty($this->_messages) : $d_data['hi'];

if (!empty($this->_status[self::HIGHESTMODSEQ]) && is_string($this->_messages)) {
$this->_messages = $this->_fromSequenceString($this->_messages);
Expand Down

0 comments on commit 4fda33f

Please sign in to comment.