Skip to content

Commit

Permalink
Fix transition to MODSEQ-enabled IMAP server. Bug #12941
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjfox authored and mrubinsk committed Jan 31, 2014
1 parent 5600800 commit 5d55e8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php
Expand Up @@ -269,7 +269,8 @@ public function getImapMessage($mailbox, $uid, array $options = array())
* @return Horde_ActiveSync_Folder_Imap The folder object, containing any
* change instructions for the device.
*
* @throws Horde_ActiveSync_Exception_FolderGone, Horde_ActiveSync_Exception
* @throws Horde_ActiveSync_Exception_FolderGone,
Horde_ActiveSync_Exception, Horde_ActiveSync_Exception_StaleState
*/
public function getMessageChanges(
Horde_ActiveSync_Folder_Imap $folder, array $options = array())
Expand Down Expand Up @@ -460,6 +461,8 @@ public function getMessageChanges(
$folder->setChanges($search_ret['match']->ids, $flags);
}
$folder->setRemoved($imap->vanished($mbox, null, array('ids' => new Horde_Imap_Client_Ids($folder->messages())))->ids);
} elseif ($modseq > 0 && $folder->modseq() == 0) {
throw new Horde_ActiveSync_Exception_StaleState('Transition to MODSEQ enabled server');
}
$folder->setStatus($status);

Expand Down

0 comments on commit 5d55e8b

Please sign in to comment.