Should have checked in further details what the possible side effects could
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 17 Jul 2003 06:32:50 +0000 (06:32 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 17 Jul 2003 06:32:50 +0000 (06:32 +0000)
be... for now just mark them as Special Folders.  That should take care of
it.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5328 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 892c0f56528e739e4be1c055c90f7e180b2b3841..df4147b06a0151c4b332df15a6bc9d15be702ba4 100755 (executable)
@@ -831,11 +831,22 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) {
             $mbx = new mailboxes();
             $mailbox = $mbx_ary[$i]['mbx'];
 
-            /* @@@ FIXME @@@
+            /* 
                 sent subfolders messes up using existing code as subfolders
                 were marked, but the parents were ordered somewhere else in
                 the list, despite having "special folders at top" option set.
                 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) {
                 case 'INBOX':
@@ -856,8 +867,6 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) {
                     break;
             }
             
-            /FIXME/
-            */
 
             if ($mailbox == 'INBOX') {
                 $mbx->is_inbox = true;