[open-ils-commits] r9748 - branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search

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


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

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

Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-05-31 14:31:59 UTC (rev 9747)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-05-31 14:32:31 UTC (rev 9748)
@@ -693,7 +693,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