فهرست منبع

Should have checked in further details what the possible side effects could
be... for now just mark them as Special Folders. That should take care of
it.

jangliss 22 سال پیش
والد
کامیت
0febb64ec6
1فایلهای تغییر یافته به همراه12 افزوده شده و 3 حذف شده
  1. 12 3
      functions/imap_mailbox.php

+ 12 - 3
functions/imap_mailbox.php

@@ -831,11 +831,22 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) {
             $mbx = new mailboxes();
             $mbx = new mailboxes();
             $mailbox = $mbx_ary[$i]['mbx'];
             $mailbox = $mbx_ary[$i]['mbx'];
 
 
-            /* @@@ FIXME @@@
+            /* 
                 sent subfolders messes up using existing code as subfolders
                 sent subfolders messes up using existing code as subfolders
                 were marked, but the parents were ordered somewhere else in
                 were marked, but the parents were ordered somewhere else in
                 the list, despite having "special folders at top" option set.
                 the list, despite having "special folders at top" option set.
                 Need a better method than this.
                 Need a better method than this.
+            */
+
+            if ($mailbox == 'INBOX') {
+                $mbx->is_special = true;
+            } elseif (stristr($trash_folder , $mailbox)) {
+                $mbx->is_special = true;
+            } elseif (stristr($sent_folder , $mailbox)) {
+                $mbx->is_special = true;
+            } elseif (stristr($draft_folder , $mailbox)) {
+                $mbx->is_special = true;
+            }
 
 
             switch ($mailbox) {
             switch ($mailbox) {
                 case 'INBOX':
                 case 'INBOX':
@@ -856,8 +867,6 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) {
                     break;
                     break;
             }
             }
             
             
-            /FIXME/
-            */
 
 
             if ($mailbox == 'INBOX') {
             if ($mailbox == 'INBOX') {
                 $mbx->is_inbox = true;
                 $mbx->is_inbox = true;