[Rt-commit] r2882 - in rt/branches/QUEBEC-EXPERIMENTAL: . html/Elements html/Search

jesse at bestpractical.com jesse at bestpractical.com
Fri May 13 20:42:08 EDT 2005


Author: jesse
Date: Fri May 13 20:42:08 2005
New Revision: 2882

Modified:
   rt/branches/QUEBEC-EXPERIMENTAL/   (props changed)
   rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowSearch
   rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Results.html
Log:
 r16738 at hualien:  jesse | 2005-05-13 01:40:25 +0100
 * Clicking through saved search titlebars on the homepage now preserves format and rows per page


Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowSearch
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowSearch	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowSearch	Fri May 13 20:42:08 2005
@@ -85,7 +85,8 @@
 $SearchArg->{'Format'} =~ s/__WebPath__/$RT::WebPath/g;
 $SearchArg->{'Format'} =~ s/__loc\(["']?(\w+)["']?\)__/loc("$1")/ge;
 my $QueryString = '?' . $m->comp('/Elements/QueryString',
-	    map { $_ => $SearchArg->{$_} } qw(Query Order OrderBy));
+                                  %$SearchArg);
+	    #map { $_ => $SearchArg->{$_} } qw(Query Order OrderBy));
 
 </%init>
 <%ARGS>

Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Results.html
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Results.html	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Results.html	Fri May 13 20:42:08 2005
@@ -104,9 +104,18 @@
 $Format      ||= $prefs->{'Format'};
 $Order       ||= $prefs->{'Order'} || 'ASC';
 $OrderBy     ||= $prefs->{'OrderBy'} || 'id';
-$Rows = (defined $prefs->{'RowsPerPage'} ? $prefs->{'RowsPerPage'} : 50)
-  unless defined($Rows);
 
+# Some forms pass in "RowsPerPage" rather than "Rows"
+# We call it RowsPerPage everywhere else.
+if ( !$Rows && $ARGS{'RowsPerPage'} ) {
+    $Rows = $ARGS{'RowsPerPage'};
+}
+elsif ( !$Rows && defined $prefs->{'RowsPerPage'} ) {
+    $Rows = $prefs->{'RowsPerPage'};
+}
+else {
+    $Rows = 50;
+}
 
 
 my ($title, $ticketcount);


More information about the Rt-commit mailing list