浏览代码

Quoting "INBOX" to fix an imap server bug. No harm in quoting the folder
name, so it shouldn't hurt other servers (tested against courier and
broken imap server hmailserver I believe).

jangliss 20 年之前
父节点
当前提交
7e54992b42
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 3 1
      ChangeLog
  2. 2 2
      functions/imap_mailbox.php

+ 3 - 1
ChangeLog

@@ -194,7 +194,9 @@ Version 1.5.1 -- CVS
   - Removed numeric keys for plugin array in config.php.
   - Fixed translations of "On DATE, AUTHOR said" and "AUTHOR said" replies.
   - Added sq_str_pad function for padding of multi-byte strings.
-  - Added sq_strlen function for calculation of multi-byte string length. 
+  - Added sq_strlen function for calculation of multi-byte string length.
+  - Quoted "INBOX" in check for the status of INBOX in a LIST call.  Fixes an
+    issue with a specific IMAP server.
 
 Version 1.5.0
 --------------------

+ 2 - 2
functions/imap_mailbox.php

@@ -787,7 +787,7 @@ function sqimap_mailbox_tree($imap_stream) {
         if ($has_inbox == false) {
             // do a list request for inbox because we should always show
             // inbox even if the user isn't subscribed to it.
-            $inbox_ary = sqimap_run_command ($imap_stream, 'LIST "" INBOX',
+            $inbox_ary = sqimap_run_command ($imap_stream, 'LIST "" "INBOX"',
                                              true, $response, $message);
             $inbox_ary = compact_mailboxes_response($inbox_ary);
             if (count($inbox_ary)) {
@@ -1050,4 +1050,4 @@ function sqimap_get_status_mbx_tree($imap_stream,&$mbx_tree) {
     }
 }
 
-?>
+?>