logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: squirrelmail/functions imap_mailbox.php,1.272,1.273: msg#00136

Subject: CVS: squirrelmail/functions imap_mailbox.php,1.272,1.273
Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17422

Modified Files:
        imap_mailbox.php 
Log Message:
translate folder names in mailbox tree


Index: imap_mailbox.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_mailbox.php,v
retrieving revision 1.272
retrieving revision 1.273
diff -u -w -r1.272 -r1.273
--- imap_mailbox.php    5 Apr 2006 00:22:01 -0000       1.272
+++ imap_mailbox.php    29 May 2006 17:30:05 -0000      1.273
@@ -339,7 +339,7 @@
 
 /**
  * Selects a mailbox
- * Before 1.3.0 used more arguments and returned data depended on those 
argumements.
+ * Before 1.3.0 used more arguments and returned data depended on those 
arguments.
  * @param stream $imap_stream imap connection resource
  * @param string $mailbox mailbox name
  * @return array results of select command (on success - permanentflags, flags 
and rights)
@@ -1152,11 +1152,21 @@
  * @since 1.5.0
  */
 function sqimap_utf7_decode_mbx_tree(&$mbx_tree) {
+    global $draft_folder, $sent_folder, $trash_folder, 
$translate_special_folders;
 
-   if (strtoupper($mbx_tree->mailboxname_full) == 'INBOX')
+    /* decode folder name and set mailboxname_sub */
+    if ($translate_special_folders && strtoupper($mbx_tree->mailboxname_full) 
== 'INBOX') {
        $mbx_tree->mailboxname_sub = _("INBOX");
-   else
+    } elseif ($translate_special_folders && $mbx_tree->mailboxname_full == 
$draft_folder) {
+        $mbx_tree->mailboxname_sub = _("Drafts");
+    } elseif ($translate_special_folders && $mbx_tree->mailboxname_full == 
$sent_folder) {
+        $mbx_tree->mailboxname_sub = _("Sent");
+    } elseif ($translate_special_folders && $mbx_tree->mailboxname_full == 
$trash_folder) {
+        $mbx_tree->mailboxname_sub = _("Trash");
+    } else {
        $mbx_tree->mailboxname_sub = 
imap_utf7_decode_local($mbx_tree->mailboxname_sub);
+    }
+
    if ($mbx_tree->mbxs) {
       $iCnt = count($mbx_tree->mbxs);
       for ($i=0;$i<$iCnt;++$i) {



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642


<Prev in Thread] Current Thread [Next in Thread>