From d2fb73e82774bee8f784de7fb4a3ca105e3d6dc1 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 18 May 2020 17:32:43 +0000 Subject: [PATCH] Bug 24155: Apply weights if not advanced search Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Bob Bennhoff Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer --- 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