[Koha-patches] [PATCH] cataloging search results from catalog don't show on later pages

Michael Hafen mdhafen at tech.washk12.org
Tue Sep 1 23:59:50 CEST 2009


In the cataloging search results from the catalog, the result set would
decrease by one per page.  Past page 19 there was an empty table.  The reason
is that SimpleSearch gives the result set ( 20 records here ), and
searchResults expects to trim the result set to just the 20 records we want.
This changes the call to searchResults() to have a 0 offset to the result set.
---
 cataloguing/addbooks.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl
index 00ccd7a..d529772 100755
--- a/cataloguing/addbooks.pl
+++ b/cataloguing/addbooks.pl
@@ -79,8 +79,9 @@ if ($query) {
     }
 
     # format output
+    # SimpleSearch() give the results per page we want, so 0 offet here
     my $total = scalar @$marcresults;
-    my @newresults = searchResults( $query, $total, $results_per_page, $page-1, 0, @$marcresults );
+    my @newresults = searchResults( $query, $total, $results_per_page, 0, 0, @$marcresults );
     $template->param(
         total          => $total_hits,
         query          => $query,
-- 
1.6.0.4




More information about the Koha-patches mailing list