Bug 43320: OPAC adjustments

Similar test plan, but on the OPAC

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Nick Clemens 2026-08-18 13:06:21 +00:00 committed by Pedro Amorim
parent 403288c5cd
commit 8e663ae7bd
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
2 changed files with 12 additions and 1 deletions

View File

@ -143,6 +143,12 @@
<div class="[% column_class | html %]"> <div class="[% column_class | html %]">
[% IF ( searchdesc ) %] [% IF ( searchdesc ) %]
[% IF ( total ) %] [% IF ( total ) %]
[% IF quoted_hits %]
<h4 class="info">
No result(s) found for your original query: [% og_query %]<br />
Your search was retried, quoted
</h4>
[% END %]
<h1 id="numresults"> <h1 id="numresults">
Your search returned [% total | html %] results. Your search returned [% total | html %] results.
<a <a

View File

@ -624,7 +624,8 @@ for ( my $i = 0 ; $i < @servers ; $i++ ) {
my $server = $servers[$i]; my $server = $servers[$i];
if ( $server && $server =~ /biblioserver/ ) { # this is the local bibliographic server if ( $server && $server =~ /biblioserver/ ) { # this is the local bibliographic server
$hits = $results_hashref->{$server}->{"hits"} // 0; $hits = $results_hashref->{$server}->{"hits"} // 0;
if ( $hits == 0 && $basic_search ) { if ( $hits == 0 && $basic_search && $operands[0] !~ /^\".*\"$/ ) {
my $og_query = $query_desc;
$operands[0] = '"' . $operands[0] . '"'; #quote it $operands[0] = '"' . $operands[0] . '"'; #quote it
## I. BUILD THE QUERY ## I. BUILD THE QUERY
( $error, $query, $simple_query, $query_cgi, $query_desc, $limit, $limit_cgi, $limit_desc, $query_type ) = ( $error, $query, $simple_query, $query_cgi, $query_desc, $limit, $limit_cgi, $limit_desc, $query_type ) =
@ -654,6 +655,10 @@ for ( my $i = 0 ; $i < @servers ; $i++ ) {
}; };
my $quoted_hits = $quoted_results_hashref->{$server}->{"hits"} // 0; my $quoted_hits = $quoted_results_hashref->{$server}->{"hits"} // 0;
if ($quoted_hits) { if ($quoted_hits) {
$template->param(
quoted_hits => 1,
og_query => $og_query,
);
$results_hashref->{'biblioserver'} = $quoted_results_hashref->{'biblioserver'}; $results_hashref->{'biblioserver'} = $quoted_results_hashref->{'biblioserver'};
$hits = $quoted_hits; $hits = $quoted_hits;
} }