From: jangliss Date: Thu, 17 Jul 2003 06:29:38 +0000 (+0000) Subject: When using sent subfolders, the special folder option is overruled because X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=cc82c2b7f25b4635b52931b4682371b326cbe853 When using sent subfolders, the special folder option is overruled because the parent isn't marked as a special folder. This code forces the parents of the special folders to also be marked as special. The rest of the subs for the parent special should follow the movement of the parent in left_main git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5327 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index eb341c77..892c0f56 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -830,6 +830,13 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) { if ($mbx_ary[$i]['mbx'] !='' ) { $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. + switch ($mailbox) { case 'INBOX': $mbx->is_inbox = true; @@ -848,6 +855,24 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) { $mbx->is_special = true; break; } + + /FIXME/ + */ + + if ($mailbox == 'INBOX') { + $mbx->is_inbox = true; + $mbx->is_special = true; + } elseif (stristr($trash_folder , $mailbox)) { + $mbx->is_trash = true; + $mbx->is_special = true; + } elseif (stristr($sent_folder , $mailbox)) { + $mbx->is_sent = true; + $mbx->is_special = true; + } elseif (stristr($draft_folder , $mailbox)) { + $mbx->is_draft = true; + $mbx->is_special = true; + } + if (isset($mbx_ary[$i]['unseen'])) { $mbx->unseen = $mbx_ary[$i]['unseen'];