[Rt-devel] Page 1 of 0

Nicholas Clark nick at ccl4.org
Wed May 16 11:26:44 EDT 2007


Empty lists of tickets currently report that they are "Page 1 of 0"
For some reason, this annoys me.

This may not be the best fix, but it does the trick, turning them into Page 1
of 1.

Nicholas Clark

--- html/Elements/TicketList~	Tue Dec 19 20:12:17 2006
+++ html/Elements/TicketList	Wed May 16 15:21:52 2007
@@ -75,7 +75,9 @@
 % if (($TotalFound % $Rows) == 0) {
 % $oddRows = 0;
 % } else { $oddRows = 1; }
-<&|/l, $Page, int($TotalFound/$Rows)+$oddRows&>Page [_1] of [_2]</&>
+% my $pages = int($TotalFound/$Rows)+$oddRows;
+% $pages = 1 if $pages < 1;
+<&|/l, $Page, $pages &>Page [_1] of [_2]</&>
 
 <%perl>
 my $prev = $m->comp(


More information about the Rt-devel mailing list