Fix cache ID generation if CONDSTORE is available on the server
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 12 Aug 2009 04:40:02 +0000 (22:40 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 12 Aug 2009 04:40:02 +0000 (22:40 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Base.php

index a8ff88a..9940350 100644 (file)
@@ -2448,7 +2448,9 @@ abstract class Horde_Imap_Client_Base
      * @param string $mailbox  A mailbox. Either in UTF7-IMAP or UTF-8.
      *
      * @return string  The cache ID string, which will change when the
-     *                 composition of the mailbox changes.
+     *                 composition of the mailbox changes. The uidvalidity
+     *                 will always be the first element, and will be delimited
+     *                 by the '|' character.
      * @throws Horde_Imap_Client_Exception
      */
     public function getCacheId($mailbox)
@@ -2467,7 +2469,7 @@ abstract class Horde_Imap_Client_Base
         $status = $this->status($mailbox, $query);
 
         if ($condstore) {
-            return implode('|', array($status['highestmodseq'], $status['uidvalidity']));
+            return implode('|', array($status['uidvalidity'], $status['highestmodseq']));
         }
 
         if (empty($status['uidnext'])) {