From c61876322213d9a70edc12b033894217d2116391 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. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- 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 a2e4d1439e..1ac168c0f2 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.39.5