浏览代码

Fix for folder cache if the cache was somehow broken. Reproduced bad cache
when managing large amounts of emails on multiple pages.

jangliss 20 年之前
父节点
当前提交
8bc2695b48
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      ChangeLog
  2. 1 1
      functions/mailbox_display.php

+ 1 - 0
ChangeLog

@@ -392,6 +392,7 @@ Version 1.5.1 -- CVS
   - sqimap_messages_delete|copy|flag and sqimap_get_small_header()
   - sqimap_messages_delete|copy|flag and sqimap_get_small_header()
     functions are removed from SquirrelMail IMAP API. Use sqimap_msgs_*
     functions are removed from SquirrelMail IMAP API. Use sqimap_msgs_*
     and sqimap_get_small_header_list() functions instead.
     and sqimap_get_small_header_list() functions instead.
+  - Fix for bad cache on massive expunge/delete/move operations.
 
 
 Version 1.5.0 - 2 February 2004
 Version 1.5.0 - 2 February 2004
 -------------------------------
 -------------------------------

+ 1 - 1
functions/mailbox_display.php

@@ -342,7 +342,7 @@ function fetchMessageHeaders($imapConnection, &$aMailbox) {
 
 
         $id_slice = array_slice($aUid,$start_msg-1,$iLimit);
         $id_slice = array_slice($aUid,$start_msg-1,$iLimit);
         /* do some funky cache checks */
         /* do some funky cache checks */
-        if (isset($aMailbox['MSG_HEADERS'])) {
+        if (isset($aMailbox['MSG_HEADERS']) && is_array($aMailbox['MSG_HEADERS'])) {
             $aUidCached = array_keys($aMailbox['MSG_HEADERS']);
             $aUidCached = array_keys($aMailbox['MSG_HEADERS']);
         } else {
         } else {
             $aMailbox['MSG_HEADERS'] = array();
             $aMailbox['MSG_HEADERS'] = array();