Bug 24155: Apply weights if not advanced search

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2020-05-18 17:32:43 +00:00 committed by Jonathan Druart
parent e474df6402
commit fec3cf23f1
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);