Browse Source

Fix: Messages shown with bad times in message list due to misinterpreted UW IMAP internal date

pdontthink 20 năm trước cách đây
mục cha
commit
c05e7e12c8
2 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 2 0
      ChangeLog
  2. 2 2
      functions/imap_messages.php

+ 2 - 0
ChangeLog

@@ -147,6 +147,8 @@ Version 1.5.1 -- CVS
   - Global file based address book is controled in configuration. Removed
     global_file address book backend (use 'local_file' instead). 
   - Added Net-Style theme by Gabriele Maidecchi. Closes patch #1041323.
+  - Fix: Messages shown with bad times in message list due to misinterpreted 
+    UW IMAP internal date
 
 Version 1.5.0
 --------------------

+ 2 - 2
functions/imap_messages.php

@@ -687,7 +687,7 @@ function parseFetch($aResponse,$aMessageList = array()) {
             case 'BODYSTRUCTURE':
                 break;
             case 'INTERNALDATE':
-                $msg['INTERNALDATE'] = str_replace('  ', ' ',parseString($read,$i));
+                $msg['INTERNALDATE'] = trim(str_replace('  ', ' ',parseString($read,$i)));
                 break;
             case 'BODY.PEEK[HEADER.FIELDS':
             case 'BODY[HEADER.FIELDS':
@@ -956,4 +956,4 @@ function sqimap_get_small_header($imap_stream, $id, $sent) {
     return $res[0];
 }
 
-?>
+?>