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 1ed1123c0e1df9c75a8020d21d3b5c461995a72f..71e2898661c13e9b9d67f291bef22815e341a625 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');