[Rt-commit] r15515 - in rt/branches/3.999-DANGEROUS: share/html/Elements
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Aug 27 08:03:45 EDT 2008
Author: sunnavy
Date: Wed Aug 27 08:03:44 2008
New Revision: 15515
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionList
Log:
r16146 at sunnavys-mb: sunnavy | 2008-08-27 18:47:41 +0800
rows => 0 means unlimit rows in one page, we need to handle that
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionList
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionList (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionList Wed Aug 27 08:03:44 2008
@@ -67,7 +67,15 @@
$page = 1 unless $page && $page > 0; # workaround problems with Page = '' or undef
$page = 1 unless $page && $page > 0; # workaround problems with $page = '' or undef
-$collection->set_page_info($rows ? ( per_page => $rows) : (per_page => 25), current_page => $page);
+
+# $rows => 0 means unlimited. not a cool way to do this, so give it a huge
+# number
+$collection->set_page_info(
+ defined $rows
+ ? ( per_page => $rows || 1_000_000_000 )
+ : ( per_page => 25 ),
+ current_page => $page
+);
# display_format lets us use a "temporary" format for display, while
# still using our original format for next/prev page links.
More information about the Rt-commit
mailing list