Bugzilla – Attachment 126960 Details for
Bug 29332
AdditionalContents displays blocks for every library prior to login
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29332: Set default library limits in search_for_display
Bug-29332-Set-default-library-limits-in-searchford.patch (text/plain), 1.60 KB, created by
Martin Renvoize (ashimema)
on 2021-10-27 10:54:57 UTC
(
hide
)
Description:
Bug 29332: Set default library limits in search_for_display
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-27 10:54:57 UTC
Size:
1.60 KB
patch
obsolete
>From f55647b45d40e3a368589e0b2585912c64f71d98 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 27 Oct 2021 11:50:18 +0100 >Subject: [PATCH] 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. >--- > Koha/AdditionalContents.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/AdditionalContents.pm b/Koha/AdditionalContents.pm >index a631862b9b..711b187ad3 100644 >--- a/Koha/AdditionalContents.pm >+++ b/Koha/AdditionalContents.pm >@@ -71,7 +71,7 @@ sub search_for_display { > > my $search_params; > $search_params->{location} = $params->{location}; >- $search_params->{branchcode} = [ $params->{library_id}, undef ] if $params->{library_id}; >+ $search_params->{branchcode} = $params->{library_id} ? [ $params->{library_id}, undef ] : undef; > $search_params->{published_on} = { '<=' => \'CAST(NOW() AS DATE)' }; > $search_params->{-or} = [ expirationdate => { '>=' => \'CAST(NOW() AS DATE)' }, > expirationdate => undef ]; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29332
:
126960
|
126962
|
126963
|
126991
|
126992
|
126993