X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=WebPac.pm;fp=WebPac.pm;h=800833a84376824b6bc24be536128345385e9562;hb=21eaf02b4bd83551186bfae0d1ca42b2d6210fa5;hp=6a1c7ef2ccf5d4e21469d235e1da7408421ac150;hpb=2d70d689d9ebd5d1a6f6dc54f13c2396a27be97e;p=webpac diff --git a/WebPac.pm b/WebPac.pm index 6a1c7ef..800833a 100644 --- a/WebPac.pm +++ b/WebPac.pm @@ -359,9 +359,11 @@ sub show_results_list { $tmpl->param('full',0); } + my $swish_msg = ' '; + # create new swish instance my $swish = SWISH::API->new($INDEX); - die $swish->ErrorString.": ".$swish->LastErrorMsg if $swish->Error; + $swish_msg .= $swish->ErrorString." ".$swish->LastErrorMsg if $swish->Error; # execute query and get number of results from SWISH-E my $search = $swish->New_Search_Object; @@ -369,12 +371,14 @@ sub show_results_list { $search->SetSort($sort); my $results = $search->Execute($sw_q); - die $swish->ErrorString.": ".$swish->LastErrorMsg if $swish->Error; + $swish_msg .= $swish->ErrorString." ".$swish->LastErrorMsg if $swish->Error; my $hits = $results->Hits; $tmpl->param('hits',$hits); - $tmpl->param('search',$sw_q); + my $search_msg = $sw_q; + $search_msg .= ''.$swish_msg.'' if ($swish_msg); + $tmpl->param('search', $search_msg); $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0); $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);