From 4075926730e3a8ea8a12722daf200b77731e98af Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 17 Dec 2007 12:12:30 -0600 Subject: [PATCH] adding query_desc and limit_desc to staff catalog search when no hits found Signed-off-by: Joshua Ferraro --- catalogue/search.pl | 4 ++++ opac/opac-search.pl | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index c9c21adc55..01f8252ad5 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -558,6 +558,10 @@ for (my $i=0;$i<=@servers;$i++) { previous_page_offset => $previous_page_offset) unless $pages < 2; $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number; } + # no hits + else { + $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc); + } } # end of the if local else { # check if it's a z3950 or opensearch source diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 54838e9c4d..0cc0dcc560 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -571,10 +571,10 @@ for (my $i=0;$i<=@servers;$i++) { previous_page_offset => $previous_page_offset) unless $pages < 2; $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number; } - else { - # Here we must handle cases where no results are returned otherwise the template gives a malformed message. -fbcit - $template->param(query_desc => $query_desc); - } + # no hits + else { + $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc); + } } # end of the if local else { # check if it's a z3950 or opensearch source -- 2.39.5