modify search "results_per_page" to accept a "pp" param to allow cgi definable value...
authorAdrian Oldham <adriann@visualthought.com.au>
Tue, 4 Sep 2007 05:12:04 +0000 (05:12 +0000)
committeradriann <adriann@45cb6cf1-00bc-42d2-bb5a-07f51df49f94>
Tue, 4 Sep 2007 05:12:04 +0000 (05:12 +0000)
site/cgi-bin/modules/BSE/UI/Search.pm

index 1ed1123..71e2898 100644 (file)
@@ -24,10 +24,10 @@ sub req_search {
   my ($class, $req) = @_;
 
   my $cfg = $req->cfg;
-  
-  my $results_per_page = 10;
-  
+    
   my $cgi = $req->cgi;
+  my $results_per_page = int($cgi->param('pp') || 10);
+  $results_per_page >= 1 or $results_per_page = 10;
   my $words = $cgi->param('q');
   my $section = $cgi->param('s');
   my $date = $cgi->param('d');