restore imap_utf7 encoding
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 23 May 2002 13:20:01 +0000 (13:20 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 23 May 2002 13:20:01 +0000 (13:20 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2854 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 3b4d504ba2c11f58f86f2fe1490c0dba657a9aa8..f9d10d95db5b36172af2a4c16eae4f512ec89569 100755 (executable)
@@ -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;
@@ -635,10 +637,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;