From: stekkel Date: Wed, 18 Jun 2003 20:13:23 +0000 (+0000) Subject: imap_utf7 decoding of mailboxes (mailbox-tree) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ae7df16e70e69ccc8b59bc9f928a130182af593f;p=squirrelmail.git imap_utf7 decoding of mailboxes (mailbox-tree) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5083 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index cf6d684d..80ab398f 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -22,15 +22,16 @@ class mailboxes { function addMbx($mbx, $delimiter, $start, $specialfirst) { $ary = explode($delimiter, $mbx->mailboxname_full); - $mbx_parent = &$this; + $mbx_parent =& $this; for ($i = $start, $c = count($ary)-1; $i < $c; $i++) { - $mbx_childs = &$mbx_parent->mbxs; + $mbx_childs =& $mbx_parent->mbxs; $found = false; if ($mbx_childs) { foreach ($mbx_childs as $key => $parent) { if ($parent->mailboxname_sub == $ary[$i]) { - $mbx_parent = &$mbx_parent->mbxs[$key]; + $mbx_parent =& $mbx_parent->mbxs[$key]; $found = true; + break; } } } @@ -41,7 +42,7 @@ class mailboxes { } else { $no_select_mbx->mailboxname_full = $ary[$i]; } - $no_select_mbx->mailboxname_sub = $ary[$i]; + $no_select_mbx->mailboxname_sub = imap_utf7_decode_local($ary[$i]); $no_select_mbx->is_noselect = true; $mbx_parent->mbxs[] = $no_select_mbx; $i--; @@ -794,7 +795,6 @@ function sqimap_mailbox_tree($imap_stream) { } } } - $boxesnew = sqimap_fill_mailbox_tree($sorted_lsub_ary); return $boxesnew; } @@ -869,9 +869,9 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false) { $r_del_pos = strrpos($mbx_ary[$i]['mbx'], $delimiter); if ($r_del_pos) { - $mbx->mailboxname_sub = substr($mbx_ary[$i]['mbx'],$r_del_pos+1); + $mbx->mailboxname_sub = imap_utf7_decode_local(substr($mbx_ary[$i]['mbx'],$r_del_pos+1)); } else { /* mailbox is root folder */ - $mbx->mailboxname_sub = $mbx_ary[$i]['mbx']; + $mbx->mailboxname_sub = imap_utf7_decode_local($mbx_ary[$i]['mbx']); } $mbx->mailboxname_full = $mbx_ary[$i]['mbx'];