Bugzilla – Attachment 168506 Details for
Bug 37244
Selecting home library or holding library facet changes library dropdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37244: Facets should not impact library pulldown.
Bug-37244-Facets-should-not-impact-library-pulldow.patch (text/plain), 2.78 KB, created by
Matt Blenkinsop
on 2024-07-04 15:19:13 UTC
(
hide
)
Description:
Bug 37244: Facets should not impact library pulldown.
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-04 15:19:13 UTC
Size:
2.78 KB
patch
obsolete
>From 7f420b40eb9cb1e65f879665f5225131989df8c8 Mon Sep 17 00:00:00 2001 >From: Andreas Jonsson <andreas.jonsson@kreablo.se> >Date: Wed, 3 Jul 2024 13:15:40 +0000 >Subject: [PATCH] Bug 37244: Facets should not impact library pulldown. > >When parsing the branch limits the regular expression matches >parameters that contains the substring "branch:" rather than the prefix >"^branch:". Consequently, both prefixes homebranch: and holdingbranch: >triggers the branch limit. > >Test plan: > >- Activate the system preference IntranetAddMastheadLibraryPulldown. >- In staff interface: > - Perform a catalogue search (e.g. "book"). > - Click on a facet for holding library or home library > (e.g. "Fairview"). > - Click on the "more options" icon in the search box and make sure > that "All libraries" is selected. >- Activate the system preference OpacAddMastheadLibraryPulldown >- In opac: > - Perform a catalogue search (e.g. "book"). > - Click on a facet for holding library or home library > (e.g. "Fairview"). > - Make sure "All libraries" is still selected in the dropdown next > to the search input. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >--- > C4/Auth.pm | 6 +++--- > catalogue/search.pl | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 57c05778d1..40ef948a33 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -554,9 +554,9 @@ sub get_template_and_user { > my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'}; > my $opac_name = ''; > if ( >- ( $opac_limit_override && $opac_search_limit && $opac_search_limit =~ /branch:([\w-]+)/ ) || >- ( $in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:([\w-]+)/ ) || >- ( $in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /multibranchlimit:(\w+)/ ) >+ ( $opac_limit_override && $opac_search_limit && $opac_search_limit =~ /^branch:([\w-]+)/ ) || >+ ( $in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /^branch:([\w-]+)/ ) || >+ ( $in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /^multibranchlimit:(\w+)/ ) > ) { > $opac_name = $1; # opac_search_limit is a branch, so we use it. > } elsif ( $in->{'query'}->param('multibranchlimit') ) { >diff --git a/catalogue/search.pl b/catalogue/search.pl >index ea37a2fa22..7c9bb22126 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -243,7 +243,7 @@ my @search_groups = > > my $branch_limit = ''; > my $limit_param = $cgi->param('limit'); >-if ( $limit_param and $limit_param =~ /branch:([\w-]+)/ ) { >+if ( $limit_param and $limit_param =~ /^branch:([\w-]+)/ ) { > $branch_limit = $1; > } > >-- >2.39.3 (Apple Git-146)
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 37244
:
168448
|
168481
| 168506