From 8d4de56c3a980e1ddc2cd0738a2f7b01c62f1312 Mon Sep 17 00:00:00 2001 From: stekkel Date: Sat, 22 May 2004 20:55:36 +0000 Subject: [PATCH] removed debug message. fixed divide by zero warning because we now use 0 instead of 999999 as limit for the number of messages to see if we hit show_all git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7519 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 1b177cb4..50a726e0 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -9,7 +9,7 @@ * This contains functions that display mailbox information, such as the * table row that has sender, date, subject, etc... * -* @version $Id$ +* $Id$ * @package squirrelmail */ @@ -653,7 +653,7 @@ function showMessagesForMailbox($imapConnection, $aMailbox) { $paginator_str = get_paginator_str($aMailbox['NAME'], $aMailbox['PAGEOFFSET'], $end_msg, $aMailbox['EXISTS'], $aMailbox['LIMIT'], $aMailbox['SORT']); - $msg_cnt_str = get_msgcnt_str($aMailbox['PAGEOFFSET'], $aMailbox['EXISTS'], $aMailbox['LIMIT']); + $msg_cnt_str = get_msgcnt_str($aMailbox['PAGEOFFSET'], $aMailbox['PAGEOFFSET']+$aMailbox['LIMIT'],$aMailbox['EXISTS']); do_hook('mailbox_index_before'); ?> @@ -1155,7 +1155,7 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs, $all_str = ''; $box = urlencode($box); - + $use = 0; /* Create simple strings that will be creating the paginator. */ $spc = ' '; /* This will be used as a space. */ $sep = '|'; /* This will be used as a seperator. */ @@ -1167,14 +1167,6 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs, /* Make sure that our start message number is not too big. */ $start_msg = min($start_msg, $num_msgs); - /* Decide whether or not we will use the mailbox cache. */ - /* Not sure why $use_mailbox_cache is even passed in. */ - if ($sort == 6) { - $use = 0; - } else { - $use = 1; - } - /* Compute the starting message of the previous and next page group. */ $next_grp = $start_msg + $show_num; $prev_grp = $start_msg - $show_num; @@ -1192,7 +1184,7 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs, } /* Page selector block. Following code computes page links. */ - if ($pg_sel && ($num_msgs > $show_num)) { + if ($show_num != 0 && $pg_sel && ($num_msgs > $show_num)) { /* Most importantly, what is the current page!!! */ $cur_pg = intval($start_msg / $show_num) + 1; -- 2.25.1