From e4026f08a13f50ecb879169087d4586b64025d7b Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 27 Oct 2025 11:56:58 +0100 Subject: [PATCH] Bug 40903: Fix OPAC advanced search applies a limit of the logged-in library by default This is caused by Bug 36742. It exists in main but starts in 24.11. The OPAC advanced search now automatically applies a limit to the 'Location and availability' section using the patron's logged in library, even if there are multiple libraries in the system. This feature must be depending on system preference 'SearchMyLibraryFirst'. 1) Set system preference 'SearchMyLibraryFirst' to 'Don't limit' 2) Go to OPAC 3) Authenticate with a user 4) Go to advanced search 5) Check there is no library selected in 'Location and availability' 6) Select a library and submit 7) Clik on 'Return to the last advanced search' 8) Check the library is selected in 'Location and availability' 9) Set system preference 'SearchMyLibraryFirst' to 'Limit' 10) Go to OPAC 11) Authenticate with a user 12) Go to advanced search 13) Check library of patron selected in 'Location and availability' Signed-off-by: Aleisha Amohia Signed-off-by: David Cook Signed-off-by: Lucas Gass (cherry picked from commit d14619158eab0e9ed9f416ad81ca1f545f9c0de0) Signed-off-by: Paul Derscheid --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt index a4651d0a4e..0cbe7c8390 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt @@ -32,7 +32,7 @@ [% INCLUDE 'bodytag.inc' bodyid='advsearch' bodyclass='scrollto' %] [% INCLUDE 'masthead.inc' %] -[% SET AllPublicBranches = Branches.all( search_params => { public => 1 } ) %] +[% SET AllPublicBranches = Branches.all( selected => opac_name, search_params => { public => 1 } ) %]