]> git.koha-community.org Git - koha.git/commit
Bug 29332: Set default library limits in search_for_display
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 27 Oct 2021 10:50:18 +0000 (11:50 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 28 Oct 2021 10:16:37 +0000 (12:16 +0200)
commit7948b429d1941e14f5d341b19aa61e5c77ce0eb0
treeb26b0ce174617cca6e5fdf55f5ae16400d55231c
parentf1780f02f28438d42d42d6993462b48fc641ed5d
Bug 29332: Set default library limits in search_for_display

Koha::AdditionalContents->search_for_display needs to filter to just
items with a 'null' branchcode if no library_id is passed.

Test plan
1/ Add some additional content blocks that should display only for
specific branches.
2/ Navigate to the OPAC and note that blocks display for all libraries
prior to login
3/ Login to the OPAC and note that now you only see you users library
block
4/ Apply the patch
5/ Repeat steps 2 and 3 and note that now you see only the 'All
libraries' blocks display prior to login and that 'All libraries' +
'Your users library' blocks appear after login.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/AdditionalContents.pm