From 134a1cdce1c130fe5d0ea30b6460c1cc214f251b Mon Sep 17 00:00:00 2001 From: ebullient Date: Sat, 7 May 2005 21:28:09 +0000 Subject: [PATCH] correctly check for messages in trash if the total is set, but is empty (since that does not necessarily mean there aren't any messages in the trash..) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9408 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/left_main.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/left_main.php b/src/left_main.php index 1272053f..272e8338 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -120,9 +120,13 @@ function ListBoxes ($boxes, $j=0 ) { /* If there are unseen message, bold the line. */ if (($move_to_trash) && ($mailbox == $trash_folder)) { - if (! isset($boxes->total)) { - $boxes->total = sqimap_status_messages($imapConnection, $mailbox); + + if ( !is_numeric($boxes->total) ) { + $result = sqimap_status_messages($imapConnection, $mailbox); + $boxes->total = $result['MESSAGES']; + $boxes->unseen = $result['UNSEEN']; } + $pre .= ""; if ($unseen > 0) { $pre .= ''; @@ -134,7 +138,7 @@ function ListBoxes ($boxes, $j=0 ) { if ($unseen_found) { $end .= " $unseen_string"; } - $end .= "\n\t" . + $end .= "\n" . '  ['._("Purge").']'. ''; } -- 2.25.1