X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=112ad87b7aca3dc1a961b526acf28b002e0a17f4;hb=a37f3771b11544a29ebd521a69599381c90e7df2;hp=d86a4fe695a793a4b6d61b0e96fb127f2bdce9d0;hpb=1d4fe45e807b6def54ad2ebefe3b21cdbf8d83a6;p=squirrelmail.git diff --git a/src/left_main.php b/src/left_main.php index d86a4fe6..112ad87b 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -1,6 +1,8 @@ 0) { + $unseen_string = "($unseen)"; + $unseen_found = true; + } else if ($unseen_type == 2) { + $numMessages = sqimap_get_num_messages($imapConnection, $real_box); + $unseen_string = "($unseen/$numMessages)"; + $unseen_found = true; + } + } else if ($unseen_notify == 3) { $unseen = sqimap_unseen_messages($imapConnection, $numUnseen, $real_box); - } + if ($unseen_type == 1 && $unseen > 0) { + $unseen_string = "($unseen)"; + $unseen_found = true; + } else if ($unseen_type == 2) { + $numMessages = sqimap_get_num_messages($imapConnection, $real_box); + $unseen_string = "($unseen/$numMessages)"; + $unseen_found = true; + } + } $line .= ""; if ($unseen > 0) @@ -62,14 +86,14 @@ if ($unseen > 0) $line .= ""; - if ($unseen > 0) { - $line .= " ($unseen)"; + if ($unseen_found) { + $line .= " $unseen_string"; } if (($move_to_trash == true) && ($real_box == $trash_folder)) { $urlMailbox = urlencode($real_box); $line .= "\n\n"; - $line .= "     ("._("purge").")"; + $line .= "   ("._("purge").")"; $line .= "\n\n"; } $line .= ""; @@ -90,6 +114,8 @@ echo "\n\n\n"; + do_hook("left_main_before"); + $boxes = sqimap_mailbox_list($imapConnection); echo "
"; @@ -122,9 +148,7 @@ } echo "\n$line
\n"; } - - - fclose($imapConnection); - + sqimap_logout($imapConnection); + do_hook("left_main_after"); ?>