Bugfix - UTF7 was being displayed to user
[squirrelmail.git] / functions / display_messages.php
index f035a2014e7a0a8b174865bba30974766280285c..74c8385f91e5b9ca4afce6636fc05a191234022e 100644 (file)
@@ -10,6 +10,7 @@
  * about any other message you can think of.
  *
  * $Id$
+ * @package squirrelmail
  */
 
 /**
@@ -18,7 +19,7 @@
  * called "src", "functions", or "plugins", but people who do that need
  * to be beaten with a steel pipe anyway.
  *
- * @return  the base uri of squirrelmail installation.
+ * @return string the base uri of squirrelmail installation.
  */
 function sqm_baseuri(){
     global $base_uri, $PHP_SELF;
@@ -36,13 +37,14 @@ function sqm_baseuri(){
 
 function error_message($message, $mailbox, $sort, $startMessage, $color) {
     $urlMailbox = urlencode($mailbox);
-
+    if (strtoupper($mailbox) == 'INBOX')
+                   $mailbox = _("INBOX");
     $string = '<tr><td ALIGN="center">' . $message . '</td></tr>'."\n".
                '<tr><td ALIGN="center">'.
                   '<A HREF="' . sqm_baseuri() 
                   . "src/right_main.php?sort=$sort&amp;startMessage=$startMessage"
                   . "&amp;mailbox=$urlMailbox\">" .
-           sprintf (_("Click here to return to %s"), $mailbox) .
+    sprintf (_("Click here to return to %s"), imap_utf7_decode_local($mailbox)) .
            '</A></td></tr>';
     error_box($string, $color);
 }
@@ -142,8 +144,8 @@ function error_box($string, $color) {
    echo '              <tr>' . html_tag( 'td', $string."\n", 'left')
                     . '</tr>';
    echo '            </table>';
+   echo '        </td></tr>';
    echo '       </table></td></tr>';
    echo '    </table>';
-   echo '  </td></tr>';
 }
 ?>