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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a6457c14aa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
ff40efa0c1
commit
c4721f5798
|
|
@ -549,9 +549,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') ) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue