updates and speedimporovements
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Apr 2000 03:49:08 +0000 (03:49 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Apr 2000 03:49:08 +0000 (03:49 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@470 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/left_main.php

index da6cffa..ca89b09 100644 (file)
 
    echo "<HTML>";
 
-   function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $color) {
+   function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $unseen) {
                global $folder_prefix, $trash_folder, $sent_folder;
                global $color, $move_to_sent, $move_to_trash;
 
       $mailboxURL = urlencode($real_box);
-      sqimap_mailbox_select ($imapConnection, $real_box);
-      $unseen = sqimap_unseen_messages($imapConnection, $numUnseen);
+//      sqimap_mailbox_select ($imapConnection, $real_box);
+      $unseen = sqimap_unseen_messages($imapConnection, $numUnseen, $real_box);
 
       echo "<NOBR>";
-      if ($unseen)
+      if ($unseen > 0)
          $line .= "<B>";
 
       $special_color = false;
          $line .= "</font></a>";
       }
 
-      if ($unseen)
+      if ($unseen > 0)
          $line .= "</B>";
 
-      if ($numUnseen > 0) {
-         $line .= "&nbsp;<small>($numUnseen)</small>";
+      if ($unseen > 0) {
+         $line .= "&nbsp;<small>($unseen)</small>";
       }
 
       if (($move_to_trash == true) && ($real_box == $trash_folder)) {
             $line .= replace_spaces(readShortMailboxName($mailbox, $delimeter));
             $line .= "</FONT>";
          } else {
-            $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $color);
+            $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
          }
       } else {
-         $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $color);
+         $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
       }
       echo "$line<BR>";
    }