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: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2026-08-18 13:06:21 +00:00 committed by Lucas Gass
parent 8bf971217c
commit 69904f28ae
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 12 additions and 1 deletions

View File

@ -143,6 +143,12 @@
<div class="[% column_class | html %]">
[% IF ( searchdesc ) %]
[% 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">
Your search returned [% total | html %] results.
<a

View File

@ -635,7 +635,8 @@ for ( my $i = 0 ; $i < @servers ; $i++ ) {
my $server = $servers[$i];
if ( $server && $server =~ /biblioserver/ ) { # this is the local bibliographic server
$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
## I. BUILD THE QUERY
( $error, $query, $simple_query, $query_cgi, $query_desc, $limit, $limit_cgi, $limit_desc, $query_type ) =
@ -665,6 +666,10 @@ for ( my $i = 0 ; $i < @servers ; $i++ ) {
};
my $quoted_hits = $quoted_results_hashref->{$server}->{"hits"} // 0;
if ($quoted_hits) {
$template->param(
quoted_hits => 1,
og_query => $og_query,
);
$results_hashref->{'biblioserver'} = $quoted_results_hashref->{'biblioserver'};
$hits = $quoted_hits;
}