X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_mailbox.php;h=f3121520b047c36bce384b93b0616b7ee7cb4f3d;hb=328869924180ada40dae9f4625520cb03b93ff98;hp=3b4d504ba2c11f58f86f2fe1490c0dba657a9aa8;hpb=c388554feea9aa23b5743ec92c57b3147c0e28f0;p=squirrelmail.git diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 3b4d504b..f3121520 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -10,7 +10,8 @@ * * $Id$ */ - +require_once('../functions/imap_utf7_encode_local.php'); +require_once('../functions/imap_utf7_decode_local.php'); global $boxesnew; class mailboxes { @@ -214,6 +215,7 @@ function sqimap_mailbox_create ($imap_stream, $mailbox, $type) { if (strtolower($type) == 'noselect') { $mailbox .= $delimiter; } + $mailbox = imap_utf7_encode_local($mailbox); $read_ary = sqimap_run_command($imap_stream, "CREATE \"$mailbox\"", true, $response, $message); sqimap_subscribe ($imap_stream, $mailbox); @@ -343,10 +345,10 @@ function sqimap_mailbox_parse ($line, $line_lsub) { else { $boxesall[$g]['formatted'] = ''; } - $boxesall[$g]['formatted'] .= readShortMailboxName($mailbox, $delimiter); + $boxesall[$g]['formatted'] .= imap_utf7_decode_local(readShortMailboxName($mailbox, $delimiter)); } else { - $boxesall[$g]['formatted'] = $mailbox; + $boxesall[$g]['formatted'] = imap_utf7_decode_local($mailbox); } $boxesall[$g]['unformatted-dm'] = $mailbox; @@ -565,6 +567,7 @@ function sqimap_mailbox_list($imap_stream) { $used[$k] = true; } $spec_sub = str_replace(' ', '', $box['formatted']); + $spec_sub = str_replace('*', '', $box['formatted']); /* In case of problems with preg here is a ereg version @@ -635,10 +638,10 @@ function sqimap_mailbox_list_all($imap_stream) { else { $boxes[$g]['formatted'] = ''; } - $boxes[$g]['formatted'] .= readShortMailboxName($mailbox, $delimiter); + $boxes[$g]['formatted'] .= imap_utf7_decode_local(readShortMailboxName($mailbox, $delimiter)); } else { - $boxes[$g]['formatted'] = $mailbox; + $boxes[$g]['formatted'] = imap_utf7_decode_local($mailbox); } $boxes[$g]['unformatted-dm'] = $mailbox;