This time really make abook files get created with correct permissions
[squirrelmail.git] / functions / page_header.php
index 31885eddc536b80f84ffa4f8376534102317a0ae..c7e0fb650a8f28997888da32838c36ad161bae2e 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Prints the page header (duh)
  *
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright © 1999-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -172,7 +172,7 @@ EOS;
  * @param string $target    The target frame for this link
  * @param string $accesskey The access key to be used, if any
  */
-function makeInternalLink($path, $text, $target='', $accesskey='') {
+function makeInternalLink($path, $text, $target='', $accesskey='NONE') {
     global $base_uri, $oTemplate;
 //    sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
 
@@ -187,7 +187,9 @@ function makeInternalLink($path, $text, $target='', $accesskey='') {
 
     return create_hyperlink($base_uri . $path, $text, $target,
                             '', '', '', '',
-                            (empty($accesskey) ? array() : array('accesskey' => $accesskey)));
+                            ($accesskey == 'NONE'
+                            ? array()
+                            : array('accesskey' => $accesskey)));
 }
 
 /**
@@ -256,7 +258,13 @@ function displayPageHeader($color, $mailbox='', $sHeaderJs='', $sOnload = '') {
         $shortBoxName = htmlspecialchars(imap_utf7_decode_local(
                     readShortMailboxName($mailbox, $delimiter)));
         if (getPref($data_dir, $username, 'translate_special_folders')) {
-            $shortBoxName = _($shortBoxName);
+            global $sent_folder, $trash_folder, $draft_folder;
+            if ($mailbox == $sent_folder)
+                $shortBoxName = _("Sent");
+            else if ($mailbox == $trash_folder)
+                $shortBoxName = _("Trash");
+            else if ($mailbox == $sent_folder)
+                $shortBoxName = _("Drafts");
         }
         $urlMailbox = urlencode($mailbox);
     } else {