Bugzilla – Attachment 151503 Details for
Bug 33663
Don't hide Suggestions link in side navigation when suggestion preference is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33663: Pass 'suggestion' to the OPAC templates only
Bug-33663-Pass-suggestion-to-the-OPAC-templates-on.patch (text/plain), 3.09 KB, created by
PTFS Europe Sandboxes
on 2023-05-21 16:45:02 UTC
(
hide
)
Description:
Bug 33663: Pass 'suggestion' to the OPAC templates only
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2023-05-21 16:45:02 UTC
Size:
3.09 KB
patch
obsolete
>From f98080f8585fac1150329251f0dcbd8086303ba7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 May 2023 10:54:39 +0200 >Subject: [PATCH] Bug 33663: Pass 'suggestion' to the OPAC templates only > >We don't need it for the staff interface. The previous patch is removing >the only occurrence using it. > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > C4/Auth.pm | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ba074bab46..8399bcdcc8 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -450,14 +450,6 @@ sub get_template_and_user { > > # these template parameters are set the same regardless of $in->{'type'} > >- # Decide if the patron can make suggestions in the OPAC >- my $can_make_suggestions; >- if ( C4::Context->preference('Suggestion') && C4::Context->preference('AnonSuggestions') ) { >- $can_make_suggestions = 1; >- } elsif ( C4::Context->userenv && C4::Context->userenv->{'number'} ) { >- $can_make_suggestions = Koha::Patrons->find(C4::Context->userenv->{'number'})->category->can_make_suggestions; >- } >- > my $minPasswordLength = C4::Context->preference('minPasswordLength'); > $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3; > $template->param( >@@ -496,7 +488,6 @@ sub get_template_and_user { > intranetstylesheet => C4::Context->preference("intranetstylesheet"), > IntranetUserCSS => C4::Context->preference("IntranetUserCSS"), > IntranetUserJS => C4::Context->preference("IntranetUserJS"), >- suggestion => $can_make_suggestions, > virtualshelves => C4::Context->preference("virtualshelves"), > StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"), > EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'), >@@ -550,6 +541,14 @@ sub get_template_and_user { > $opac_name = C4::Context->userenv->{'branch'}; > } > >+ # Decide if the patron can make suggestions in the OPAC >+ my $can_make_suggestions; >+ if ( C4::Context->preference('Suggestion') && C4::Context->preference('AnonSuggestions') ) { >+ $can_make_suggestions = 1; >+ } elsif ( C4::Context->userenv && C4::Context->userenv->{'number'} ) { >+ $can_make_suggestions = Koha::Patrons->find(C4::Context->userenv->{'number'})->category->can_make_suggestions; >+ } >+ > my @search_groups = Koha::Library::Groups->get_search_groups({ interface => 'opac' })->as_list; > $template->param( > AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), >-- >2.30.2
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 33663
:
150950
|
150951
|
151502
|
151503
|
151600
|
151601