Skip to content

Commit

Permalink
Reorder these checks, cleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 3, 2016
1 parent 975730c commit aee9494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php
Expand Up @@ -348,9 +348,8 @@ public function getMessageChanges(
$this->_procid,
serialize($status))
);
$current_modseq = $status[Horde_ActiveSync_Folder_Imap::HIGHESTMODSEQ];

// Sanity checks.
// UIDVALIDITY
if ($folder->uidnext() != 0) {
$folder->checkValidity($status);
}
Expand All @@ -363,6 +362,7 @@ public function getMessageChanges(
// otherwise corrupted. Normally this would be handled as a loss of
// server state and handled by a complete resync, but a majority of
// EAS clients do not properly handle the status codes that report this.
$current_modseq = $status[Horde_ActiveSync_Folder_Imap::HIGHESTMODSEQ];
if ($modseq_corrupted = $folder->modseq() > $current_modseq) {
$this->_logger->err(sprintf(
'[%s] IMAP Server error: Current HIGHESTMODSEQ is lower than previously reported.',
Expand Down

0 comments on commit aee9494

Please sign in to comment.