From 64a4eddd44fd231d28cd95dd8a487f7fb9cf0cec Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 19 Dec 2007 20:28:14 -0600 Subject: [PATCH] 2nd try:Fixed buggy NoZebra cataloguing search when search term does not exist in any record. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Search.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 8407f2ee80..d616b692be 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -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 = @_; -- 2.39.5