From: ebullient Date: Sat, 31 Jan 2004 03:05:43 +0000 (+0000) Subject: Tassbrains found an ittty bitty bug, which I've quashed. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eac264935e8da241a837ac60bd3d3a94a071c0c6;p=squirrelmail.git Tassbrains found an ittty bitty bug, which I've quashed. Indexes with no pages (blank paginator) now appear with no paginator! (instead of [ ] ) Thanks, Chris! git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6474 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index d2ca9175..fdf317f9 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -1041,7 +1041,7 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs, /* Initialize paginator string chunks. */ $prv_str = ''; $nxt_str = ''; - $pg_str = ' '; + $pg_str = ''; $all_str = ''; $box = urlencode($box); @@ -1200,13 +1200,6 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs, . "TARGET=\"right\">" ._("Paginate") . ''; } - /* If necessary, compute the 'show all' string. */ - if (($prv_str != '') || ($nxt_str != '')) { - $all_str = "" . _("Show All") . ''; - } - /* Put all the pieces of the paginator string together. */ /** * Hairy code... But let's leave it like it is since I am not certain @@ -1219,8 +1212,14 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs, $result .= ($prv_str != '' ? $prv_str . $spc . $sep . $spc : ''); $result .= ($nxt_str != '' ? $nxt_str : ''); $result .= ']' . $spc ; + + /* Compute the 'show all' string. */ + $all_str = "" . _("Show All") . ''; } - $result .= ($pg_str != '' ? $spc . '['.$pg_str.']' . $spc : ''); + + $result .= ($pg_str != '' ? $spc . '['.$spc.$pg_str.']' . $spc : ''); $result .= ($all_str != '' ? $spc . '['.$all_str.']' . $spc . $spc : ''); /* If the resulting string is blank, return a non-breaking space. */