From f1681e34f4e784bc2d2bcc9a4ed3a77aca229297 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 23 Aug 2023 17:47:46 +0000 Subject: [PATCH] Bug 34601: Pass module into params 1. Make a suggestion 2. Try to edit, delete, or manage the suggestion. 3. Error: 4. Apply patch and restart_all 5. Try again and you should not get the error anymore. --- suggestion/suggestion.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 36a9f063af..8bfdc2b31d 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -135,7 +135,7 @@ my $branchfilter = $input->param('branchcode') || C4::Context->userenv->{'branch ## if ( $op =~ /save/i ) { - output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); + output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions' , check => 'csrf_token' }); my @messages; my $biblio = MarcRecordFromNewSuggestion({ title => $suggestion_only->{title}, @@ -254,7 +254,7 @@ elsif ($op=~/add/) { } elsif ($op=~/edit/) { #Edit suggestion - output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); + output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); $suggestion_ref->{reasonsloop} = $reasonsloop; my $other_reason = 1; @@ -269,7 +269,7 @@ elsif ($op=~/edit/) { $op ='save'; } elsif ($op eq "update_status" ) { - output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); + output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); my $suggestion; # set accepted/rejected/managed informations if applicable # ie= if the librarian has chosen some action on the suggestions @@ -306,7 +306,7 @@ elsif ($op eq "update_status" ) { } redirect_with_params($input); }elsif ($op eq "delete" ) { - output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); + output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); foreach my $delete_field (@editsuggestions) { &DelSuggestion( $borrowernumber, $delete_field,'intranet' ); } -- 2.30.2