Don't update metadata if nothing has changed
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Mar 2009 17:51:21 +0000 (11:51 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Mar 2009 18:22:47 +0000 (12:22 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php

index 0a8718c..821fb3b 100644 (file)
@@ -822,7 +822,8 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
             if (is_null($this->_temp['mailbox']['highestmodseq']) ||
                 ($this->_temp['mailbox']['uidvalidity'] != $metadata['uidvalid'])) {
                 $this->_cache->deleteMailbox($mailbox);
-            } else {
+            } elseif (!isset($metadata['HICmodseq']) ||
+                      ($metadata['HICmodseq'] != $this->_temp['mailbox']['highestmodseq'])) {
                 /* We know the mailbox has been updated, so update the
                  * highestmodseq metadata in the cache. */
                 $this->_updateMetaData($mailbox, array('HICmodseq' => $this->_temp['mailbox']['highestmodseq']));