bugfix
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Jun 2005 21:26:12 +0000 (21:26 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Jun 2005 21:26:12 +0000 (21:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@779 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/opensearch.ttk

index ea10b27..cfa3ac7 100644 (file)
@@ -5,6 +5,11 @@ j = ws.bootstrap_client("/pines/conf/bootstrap.conf");
 
 rank_threshold = 5000;
 
+pagesize = 10;
+IF CGI.param('pagesize');
+       pagesize = CGI.param('pagesize');
+END;
+
 itempage = CGI.param('itempage');
 
 #type,string,location,depth
@@ -22,9 +27,8 @@ depth = CGI.param('mr_search_depth');
 limit = pagesize;
 offset = itempage * pagesize - 1;
 
-pagesize = 10;
-IF CGI.param('pagesize');
-       pagesize = CGI.param('pagesize');
+IF offset < 0;
+       offset = 0;
 END;
 
 req = session.request(count_meth, type, string, location, depth);