From 812c3cc4e8b29ca53d47b2e05e6e1590ae51e2b0 Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Thu, 26 Jun 2025 12:01:10 +0000 Subject: [PATCH] Bug 40248: With IndependentBranches and SearchMyLibraryFirst logged in user is unable to search other libraries' resources Recently (between 23.11 and 24.11) the following problem has emerged: with IndependentBranches = 'Yes' and SearchMyLibraryFirst = 'Limit' a logged in user is unable to search other libraries' resources, even if OpacAddMastheadLibraryPulldown is set to 'Add'. Test plan: 1. Set system preferences: SearchMyLibraryFirst to Limit IndependentBranches to Yes OpacAddMastheadLibraryPulldown to Add 2. Open OPAC page. You should see the libraries pull down on the right (next to the magnifying glass icon). 3. Perform a search for a common word (e.g. Peter), note the number of results. 4. Log in to OPAC as a normal user (not superlibrarian). 5. Repeat the search. You should get less results (only from your library). You will not be able to broaden the search and get results from all libraries (until you log out). You will also not see the libraries pull down. 6. Apply the patch ; restart_all. 7. Repeat p. 2-5. Now you should be able to see the libraries pull down, select All libraries and broaden the search for all libraries' resources. --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 294963397c..16a0fd7fbb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -310,7 +310,7 @@ - [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && AllPublicBranches.size > 1 ) %] + [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && ( AllPublicBranches.size > 1 || Koha.Preference( 'IndependentBranches' ) ) ) %]