2nd try:Fixed buggy NoZebra cataloguing search when search term does not exist in any record.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Nighswonger 2007-12-19 20:28:14 -06:00 committed by Joshua Ferraro
parent 6d13d44655
commit 64a4eddd44
1 changed files with 2 additions and 2 deletions

View File

@ -203,8 +203,8 @@ $template->param(result=>\@results);
sub SimpleSearch {
my $query = shift;
if (C4::Context->preference('NoZebra')) {
my $result = NZorder(NZanalyse($query))->{'biblioserver'}->{'RECORDS'};
my $search_result = ( $result->{hits} && $result->{hits} > 0 ? $result : [] );
my $result = NZorder(NZanalyse($query))->{'biblioserver'};
my $search_result = ( $result->{hits} && $result->{hits} > 0 ? $result->{'RECORDS'} : [] );
return (undef,$search_result);
} else {
my @servers = @_;