[open-ils-commits] r9749 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search

svn at svn.open-ils.org svn at svn.open-ils.org
Sat May 31 10:32:51 EDT 2008


Author: erickson
Date: 2008-05-31 10:32:49 -0400 (Sat, 31 May 2008)
New Revision: 9749

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
added some input scrubbing on limit and offset

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-05-31 14:32:31 UTC (rev 9748)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-05-31 14:32:49 UTC (rev 9749)
@@ -758,7 +758,10 @@
 
     my $user_offset = $search_hash->{offset} || 0; # user-specified offset
     my $user_limit = $search_hash->{limit} || 10;
+    $user_offset = ($user_offset >= 0) ? $user_offset : 0;
+    $user_limit = ($user_limit >= 0) ? $user_limit : 10;
 
+
     # we're grabbing results on a per-superpage basis, which means the 
     # limit and offset should coincide with superpage boundaries
     $search_hash->{offset} = 0;



More information about the open-ils-commits mailing list