From 091d3100169a12e9498f6d58c8b61ac01a5a5db6 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Sat, 26 Mar 2011 18:24:19 -0400 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 Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- 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 b22837ad83..968f2a1b2b 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 f7c2adf6cd..bd0752cd08 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 d22049f3fe..c145729d7e 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; -- 2.39.5