Bugzilla – Attachment 120571 Details for
Bug 21249
Syspref to choose whether to search homebranch, holding branch or both for library groups in advanced search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21249: (follow-up) Implement SearchLibraryLimit for individual library
Bug-21249-follow-up-Implement-SearchLibraryLimit-f.patch (text/plain), 2.49 KB, created by
Victor Grousset/tuxayo
on 2021-05-05 21:18:33 UTC
(
hide
)
Description:
Bug 21249: (follow-up) Implement SearchLibraryLimit for individual library
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2021-05-05 21:18:33 UTC
Size:
2.49 KB
patch
obsolete
>From 241c0273f3ecfff4d2c50b3668cce13e29c8d7cc Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 24 Feb 2021 10:48:10 +1300 >Subject: [PATCH] Bug 21249: (follow-up) Implement SearchLibraryLimit for > individual library > >before this patch, the limit only applies to groups of libraries > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > catalogue/search.pl | 19 +++++++++++++++++++ > opac/opac-search.pl | 19 +++++++++++++++++++ > 2 files changed, 38 insertions(+) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 32bd6438fc..a2398db7e7 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -399,6 +399,25 @@ if ( $params->{'multibranchlimit'} ) { > } > } > >+for ( my $i=0; $i<@limits; $i++ ) { >+ if ( $limits[$i] =~ /^branch:/ ) { >+ my $branchfield = C4::Context->preference('SearchLimitLibrary'); >+ if ( $branchfield eq "homebranch" ) { >+ $limits[$i] =~ s/branch/homebranch/; >+ } >+ elsif ( $branchfield eq "holdingbranch" ) { >+ $limits[$i] =~ s/branch/holdingbranch/; >+ } >+ else { >+ my $homebranchlimit = $limits[$i]; >+ my $holdingbranchlimit = $limits[$i]; >+ $homebranchlimit =~ s/branch/homebranch/; >+ $holdingbranchlimit =~ s/branch/holdingbranch/; >+ $limits[$i] = "$homebranchlimit or $holdingbranchlimit"; >+ } >+ } >+} >+ > my $available; > foreach my $limit(@limits) { > if ($limit =~/available/) { >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index b759d152b3..bc344c2076 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -505,6 +505,25 @@ if ( $params->{'multibranchlimit'} || ( $branch_group_limit && $branch_group_lim > } > } > >+for ( my $i=0; $i<@limits; $i++ ) { >+ if ( $limits[$i] =~ /^branch:/ ) { >+ my $branchfield = C4::Context->preference('SearchLimitLibrary'); >+ if ( $branchfield eq "homebranch" ) { >+ $limits[$i] =~ s/branch/homebranch/; >+ } >+ elsif ( $branchfield eq "holdingbranch" ) { >+ $limits[$i] =~ s/branch/holdingbranch/; >+ } >+ else { >+ my $homebranchlimit = $limits[$i]; >+ my $holdingbranchlimit = $limits[$i]; >+ $homebranchlimit =~ s/branch/homebranch/; >+ $holdingbranchlimit =~ s/branch/holdingbranch/; >+ $limits[$i] = "$homebranchlimit or $holdingbranchlimit"; >+ } >+ } >+} >+ > my $available; > foreach my $limit(@limits) { > if ($limit =~/available/) { >-- >2.31.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 21249
:
78013
|
78014
|
78921
|
82138
|
83518
|
93345
|
93346
|
95099
|
95100
|
95101
|
103618
|
103619
|
103620
|
103621
|
103622
|
117220
|
117221
|
117222
|
117223
|
117224
|
120481
|
120567
|
120568
|
120569
|
120570
|
120571
|
120572
|
120575
|
120576
|
120577
|
120578
|
120579
|
120580