From 518de6da3f3b36ddc135cbb2a6ff3ccc699a3234 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 14 Oct 2010 15:41:40 +0200 Subject: [PATCH] Bug 3629 : search limit by group is not OK MT4491 : limitation by library group - the group list was not displayed in OPAC (even if everything else was here - the group limit was not working due to a missing () author=jean et group=droit" resulted in: author=jean and branch=b1 or branch=b2 or branch=b3 that is wrong (executed from left to right) the fix add () to have : author=jean and (branch=b1 or branch=b2 or branch=b3) that is OK --- catalogue/search.pl | 2 +- .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 10 +++++++++- opac/opac-search.pl | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index b22837a..968f2a1 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -396,7 +396,7 @@ my @limits; @limits = split("\0",$params->{'limit'}) if $params->{'limit'}; if($params->{'multibranchlimit'}) { -push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; + push @limits, '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; } my $available; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index f7c2adf..bd0752c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -247,7 +247,15 @@ - + +

OR

+ +
diff --git a/opac/opac-search.pl b/opac/opac-search.pl index d22049f..c145729 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -317,7 +317,7 @@ my @limits; @limits = split("\0",$params->{'limit'}) if $params->{'limit'}; if($params->{'multibranchlimit'}) { -push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; + push @limits, '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; } my $available; -- 1.7.1