Bugzilla – Attachment 117224 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.43 KB, created by
Aleisha Amohia
on 2021-02-23 22:04:35 UTC
(
hide
)
Description:
Bug 21249: (follow-up) Implement SearchLibraryLimit for individual library
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2021-02-23 22:04:35 UTC
Size:
2.43 KB
patch
obsolete
>From 49a5008c12df079367850d0e70992c40b076419a 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 >--- > 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 4446ca944b..a9a840f7bb 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -395,6 +395,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 0643dfc15e..6fb25e9f12 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -516,6 +516,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.11.0
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