From ae012102619a8d058bc681d5296de7ac4eff1c16 Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 17 Oct 2002 20:09:54 +0000 Subject: [PATCH] fix for checking notifying type git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3902 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/left_main.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/left_main.php b/src/left_main.php index 6d861511..b020d8eb 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -45,11 +45,18 @@ function formatMailboxName($imapConnection, $box_array) { if (ereg("^( *)([^ ]*)$", $mailbox, $regs)) { $mailbox = $regs[2]; } - $status = create_unseen_string($real_box, $box_array, $imapConnection); - if ($status !== false) { - list($unseen_string, $unseen) = $status; + $unseen = 0; + $status = array(); + if (($unseen_notify == 2 && $real_box == 'INBOX') || + $unseen_notify == 3) { + $status = create_unseen_string($real_box, $box_array, $imapConnection, $unseen_type ); + if ($status !== false) { + list($unseen_string, $unseen) = $status; + } else { + list($unseen_string, $unseen) = array(_("Not available"),''); + } } else { - list($unseen_string, $unseen) = array(_("Not available"),''); + list($unseen_string, $unseen) = array('',''); } $special_color = ($use_special_folder_color && isSpecialMailbox($real_box)); @@ -188,7 +195,7 @@ function create_collapse_link($boxnum) { * @return array[0] unseen message string (for display) * @return array[1] unseen message count */ -function create_unseen_string($boxName, $boxArray, $imapConnection) { +function create_unseen_string($boxName, $boxArray, $imapConnection, $unseen_type) { global $boxes, $unseen_type, $color, $unseen_cum; /* Initialize the return value. */ -- 2.25.1