Bugzilla – Attachment 3490 Details for
Bug 3629
search limit by group is not OK
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-3629-search-limit-by-group-is-not-OK.patch (text/plain), 3.11 KB, created by
Chris Cormack
on 2011-03-29 02:37:49 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-29 02:37:49 UTC
Size:
3.11 KB
patch
obsolete
>From 518de6da3f3b36ddc135cbb2a6ff3ccc699a3234 Mon Sep 17 00:00:00 2001 >From: Paul POULAIN <paul.poulain@biblibre.com> >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 @@ > <!--/TMPL_IF--> > <!-- /TMPL_LOOP --> > </select> >- >+ <!-- TMPL_IF NAME="searchdomainloop" --> >+ <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. --> >+ <label for="categoryloop">Groups of Libraries</label><select name="multibranchlimit" id="categoryloop"> >+ <option value=""> -- none -- </option> >+ <!-- TMPL_LOOP NAME="searchdomainloop" --> >+ <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="categoryname" --></option> >+ <!-- /TMPL_LOOP --> >+ </select> >+ <!-- /TMPL_IF --> > <div style="margin-top:.4em"><label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label></div> > </fieldset></div> > <!-- /TMPL_UNLESS --> >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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3629
: 3490