From 1a0e098373693d1b3d878622c5e86924585f3b5b Mon Sep 17 00:00:00 2001 From: thomppj Date: Mon, 5 Nov 2001 02:17:08 +0000 Subject: [PATCH] Fixed the paginator (which I previously broke)... git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1691 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 361373da..3cad43f9 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -376,7 +376,7 @@ do_hook('mailbox_index_before'); $msg_cnt_str = get_msgcnt_str($start_msg, $end_msg, $num_msgs); - $paginator_str = get_paginator_str($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num); + $paginator_str = get_paginator_str($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num, $sort); if (! isset($msg)) { $msg = ''; @@ -666,7 +666,9 @@ * This function computes the paginator string. */ function get_paginator_str - ($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num) { + ($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num, $sort) { + global $username, $data_dir, $use_mailbox_cache; + $nextGroup = $start_msg + $show_num; $prevGroup = $start_msg - $show_num; @@ -701,25 +703,25 @@ $j++; } $start_msgs = min( $start_msgs, $num_msgs ); - $p = intval( $start_msgs / $show_num ) + 1; + $p = intval( $start_msg / $show_num ) + 1; $i = 1; while( $i < $p ) { $pg = intval( $i ); $start = ( ($pg-1) * $show_num ) + 1; $mMore .= "$pg "; + "&mailbox=$urlMailbox\" TARGET=\"right\">$pg "; $i += $k; } - $mMore .= "$p "; + $mMore .= "$p "; $i += $k; while( $i <= $j ) { $pg = intval( $i ); $start = ( ($pg-1) * $show_num ) + 1; $mMore .= "$pg "; + . "&mailbox=$urlMailbox\" TARGET=\"right\">$pg "; $i+=$k; } - $mMore .= ' | '; + $mMore .= ' | '; } /* Return the resulting string. */ -- 2.25.1