From: Bill Erickson Date: Wed, 5 Oct 2011 13:39:47 +0000 (-0400) Subject: Z39.50 local catalog fetch-more repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0c2112774a42c8371ae3c170f9926ff8a1c1fb1c;p=evergreen%2Fpines.git 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 --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index ed6b981fcb..ff82f8645a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -956,7 +956,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(