From 6b3f2dee7a3454193914bf80e3c7a102d68b15e5 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 5 Oct 2011 09:39:47 -0400 Subject: [PATCH] Z39.50 local catalog fetch-more repairs Fixes the following problem: When paging through local catalog results in the Z39.50 interface, paging off then end of the local results would result in an unknown server error caused by trying to retrieve an empty list of records. $list->{count} in this context is the overall hit count, not the counts in the current page of results. Note also if {count} is zero, the list of IDs will be undef, so we use both. Signed-off-by: Bill Erickson Signed-off-by: Jason Etheridge --- Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index d83f0f64d4..005eb017a9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -852,7 +852,7 @@ sub cat_search_z_style_wrapper { my $list = the_quest_for_knowledge( $self, $client, $searchhash ); - if ($list->{count} > 0) { + if ($list->{count} > 0 and @{$list->{ids}}) { $result->{count} = $list->{count}; my $records = $cstore->request( -- 2.11.0