From 688864c099c860762f90c3c09e58d30b1798d3cd Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 18 May 2020 17:32:43 +0000 Subject: [PATCH] Bug 24155: Apply wieghts if not advanced search Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Bob Bennhoff --- catalogue/search.pl | 2 +- opac/opac-search.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index af822bf652..b6b38728d7 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -427,7 +427,7 @@ my $count = C4::Context->preference('numSearchResults') || 20; my $results_per_page = $params->{'count'} || $count; my $offset = $params->{'offset'} || 0; my $whole_record = $params->{'whole_record'} || 0; -my $weight_search = $params->{'weight_search'} || 0; +my $weight_search = $params->{'advsearch'} ? $params->{'weight_search'} || 0 : 1; $offset = 0 if $offset < 0; my $page = $cgi->param('page') || 1; #my $offset = ($page-1)*$results_per_page; diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 99f26685a8..0e679dab34 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -532,7 +532,7 @@ $offset = 0 if $offset < 0; my $page = $cgi->param('page') || 1; $offset = ($page-1)*$results_per_page if $page>1; my $hits; -my $weight_search = $cgi->param('weight_search') || 0; +my $weight_search = $cgi->param('advsearch') ? $cgi->param('weight_search') || 0 : 1; # Define some global variables my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type); -- 2.11.0