fix for bug #554886
[squirrelmail.git] / src / left_main.php
index 2009a52599ccb69419a96e7c2b647ca72f301e15..70c7ce6f73cc6f2bedbb6a8fe37690a36d523dc6 100644 (file)
@@ -65,7 +65,7 @@ function formatMailboxName($imapConnection, $box_array) {
     if ($unseen > 0) { $line .= '<B>'; }
 
     /* Crate the link for this folder. */
-    $line .= "<A HREF=\"right_main.php?sort=0&startMessage=1&mailbox=$mailboxURL\" TARGET=\"right\" STYLE=\"text-decoration:none\">";
+    $line .= "<A HREF=\"right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" TARGET=\"right\" STYLE=\"text-decoration:none\">";
     if ($special_color) {
         $line .= "<FONT COLOR=\"$color[11]\">";
     }
@@ -94,7 +94,7 @@ function formatMailboxName($imapConnection, $box_array) {
         if ($numMessages > 0) {
             $urlMailbox = urlencode($real_box);
             $line .= "\n<small>\n" .
-                    "&nbsp;&nbsp;(<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("empty")."</A>)" .
+                    "&nbsp;&nbsp;(<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
                     "</small>";
         }
     }
@@ -200,8 +200,11 @@ global $delimiter, $default_folder_prefix;
 // open a connection on the imap port (143)
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
 
-
-if (isset($left_refresh) && ($left_refresh != 'none') && ($left_refresh != '')) {
+/**
+ * Using stristr since older preferences may contain "None" and "none".
+ */
+if (isset($left_refresh) && ($left_refresh != '') &&
+    !stristr($left_refresh, "none")){
     $xtra =  "\n<META HTTP-EQUIV=\"Expires\" CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">\n" .
              "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n".
              "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$left_refresh;URL=left_main.php\">\n";
@@ -341,8 +344,8 @@ for ($i = 0; $i < count($boxes); $i++) {
     }
 }
 
-sqimap_logout($imapConnection);
 do_hook('left_main_after');
+sqimap_logout($imapConnection);
 
 echo "</BODY></HTML>\n";