From 43a8439eaf30e692940a6574c2e641e74546cd0e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 21 Jan 2020 10:26:04 +0100 Subject: [PATCH] Bug 24345: Fix OPACViewOthersSuggestions Default value for $op needs to be set before the get_template_and_user lines as it's tested for OPACViewOthersSuggestions. --- opac/opac-suggestions.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 7593a3529b..229cd017a6 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -36,7 +36,7 @@ use Koha::Patrons; use Koha::DateUtils qw( dt_from_string ); my $input = new CGI; -my $op = $input->param('op'); +my $op = $input->param('op') || 'else'; my $biblionumber = $input->param('biblionumber'); my $suggestion = $input->Vars; my $negcaptcha = $input->param('negcap'); @@ -84,7 +84,6 @@ else { # DBIx::Class::Row::store_column(): No such column 'negcap' on Koha::Schema::Result::Suggestion at Koha/C4/Suggestions.pm delete $suggestion->{negcap}; delete $suggestion->{$_} foreach qw; -$op = 'else' unless $op; if ( $op eq 'else' ) { if ( C4::Context->preference("OPACViewOthersSuggestions") ) { -- 2.11.0