diff --git a/C4/Auth.pm b/C4/Auth.pm index 9df309ebea..a006baa8d8 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -449,7 +449,9 @@ sub get_template_and_user { # Decide if the patron can make suggestions in the OPAC my $can_make_suggestions; - if ( C4::Context->userenv && C4::Context->userenv->{'number'} ) { + 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; } diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index fbab4ec2c9..c13f52f4dc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -329,7 +329,7 @@ Browse search [% END %] - [% IF Koha.Preference( 'suggestion' ) == 1 %] + [% IF suggestion %] [% IF Koha.Preference( 'AnonSuggestions' ) == 1 || Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]