The code implementing multiple PAC's by URL support as in the RFC here at http://wiki.koha-community.org/wiki/Support_for_multiple_PAC_interfaces_by_URL_RFC has been implimented for some time. However, when the 'search by groups' feature was implemented, the above code was not taken into account, and as such if you wish to limit a search by a group as a posed to just a branch, you met with strange behaviour should you also enable the SearchMyLibraryFirst system preference. Testplan to show Failure 1. Add a second PAC by adding an Alias to your Apache vhosts file (See below example) 2. Add a Search group to Koha using the staff client 3. Enable URL specific search limit (branch:search_group_code) to that same Apache vhosts file using a SetEnvIf (See below example) 4. Enable 'SearchMyLibraryFirst' system preference. 5. Create a user, and set that users branch. 6. Go to the 'normal' koha opac url and the search will not be limited 7. Go to the 'second' koha opac url and the search will be limited to your search group 8. Login on the 'normal' url and your search will be limited by your users branch 9. Login on the 'second' url and your search will be limited by your users branch Step 9 is the error, if OPAC_LIMIT_OVERRIDE is set to 1 in the SetEnvIf then this should NOT be your local library branch, but actually the limit set in the Apache conf VirtualHosts example additions ServerName opac.your-domain.com ServerAlias opac2.your-domain.com SetEnvIf Host "opac2.your-domain.com" OPAC_SEARCH_LIMIT=branch:search_group_code OPAC_LIMIT_OVERRIDE=1
Created attachment 20708 [details] [review] Bug 10798 - OPAC_SEARCH_LIMIT behaves badly with search groups
Patch applied cleanly, go forth and signoff
Created attachment 21739 [details] [review] [SIGNED-OFF] Bug 10798 - OPAC_SEARCH_LIMIT behaves badly with search groups Since the addition of search groups to koha, the branch limiting parameter in multiple PAC by URL support should also support limiting by these search groups. This patch adds this ability. Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
QA comment: trivial patch, but with tabs instead of spaces ! will pass it QA with a follow-up
Created attachment 22237 [details] [review] Bug 10798 - OPAC_SEARCH_LIMIT behaves badly with search groups Since the addition of search groups to koha, the branch limiting parameter in multiple PAC by URL support should also support limiting by these search groups. This patch adds this ability. Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Created attachment 22238 [details] [review] Bug 10798 follow-up: replacing tabs by spaces Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Pushed to master. Thanks, Martin!