소스 검색

Headers fetch from read_body triggered by using the prev/next links didn't
add sufficient info for displaying the correct header in the messages list.
The extra check detects if the header is complete and add the specific uid
to the array with headers to be fetched.

stekkel 19 년 전
부모
커밋
4801835e4c
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      functions/mailbox_display.php

+ 6 - 0
functions/mailbox_display.php

@@ -346,6 +346,12 @@ 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']) && is_array($aMailbox['MSG_HEADERS'])) {
         if (isset($aMailbox['MSG_HEADERS']) && is_array($aMailbox['MSG_HEADERS'])) {
+            // temp code, read_body del / next links fo not update fields.
+            foreach ($aMailbox['MSG_HEADERS'] as $iUid => $aValue) {
+                if (!isset($aValue['UID'])) {
+                    unset($aMailbox['MSG_HEADERS'][$iUid]);
+                }
+            }
             $aUidCached = array_keys($aMailbox['MSG_HEADERS']);
             $aUidCached = array_keys($aMailbox['MSG_HEADERS']);
         } else {
         } else {
             $aMailbox['MSG_HEADERS'] = array();
             $aMailbox['MSG_HEADERS'] = array();