From b774b098c81ae979d2739510b8f76e02114aea9c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Sat, 11 Sep 2021 15:12:31 +0000 Subject: [PATCH] Bug 28847: (follow-up) Handle branch_group_limit To test: 1 - Create a library group as an OPAC search group 2 - Enable OpacAddMastheadLibraryPulldown 3 - Browse to: http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=t&branch_group_limit=multibranchlimit-1&weight_search=1 4 - Confirm search works and returns correct results 5 - Confirm dropdown is correctly populated --- opac/opac-search.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index f7254a1f20..0bd1026faf 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -79,12 +79,13 @@ my $cgi = CGI->new; my $branch_group_limit = $cgi->param("branch_group_limit"); if ( $branch_group_limit ) { if ( $branch_group_limit =~ /^multibranchlimit-/ ) { + # branch_group_limit is deprecated, it should no longer be used # For search groups we are going to convert this branch_group_limit CGI - # parameter into a multibranchlimit CGI parameter for the purposes of + # parameter into a multibranchlimit limit CGI parameter for the purposes of # actually performing the query $cgi->param( - -name => 'multibranchlimit', - -values => substr($branch_group_limit, 17) + -name => 'limit', + -values => 'multibranchlimit:' . substr($branch_group_limit, 17) ); } else { $cgi->append( -- 2.20.1