From 4fe6021685facd04926fce2af6b406c398bed58f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 14 Feb 2024 09:54:48 +0000 Subject: [PATCH] Bug 34478: Update op for opac-account-pay Signed-off-by: Jonathan Druart --- .../opac-tmpl/bootstrap/en/includes/account-table.inc | 2 +- opac/opac-account-pay.pl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc index 801018677d..04e37d1197 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc @@ -1,7 +1,7 @@ [% PROCESS 'accounts.inc' %]
[% INCLUDE 'csrf-token.inc' %] - + [% IF ( ACCOUNT_LINES ) %] diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl index 30be841dfc..6dbb9ffa4c 100755 --- a/opac/opac-account-pay.pl +++ b/opac/opac-account-pay.pl @@ -30,7 +30,8 @@ use Koha::Acquisition::Currencies; use Koha::Database; use Koha::Plugins::Handler; -my $cgi = CGI->new; +my $cgi = CGI->new; +my $op = $cgi->param('op'); my $payment_method = $cgi->param('payment_method'); my @accountlines = $cgi->multi_param('accountline'); @@ -46,6 +47,11 @@ unless ( $use_plugin ) { exit; } +unless ( $op eq 'cud-pay' ) { + print $cgi->redirect("/cgi-bin/koha/errors/400.pl"); + exit; +} + my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "opac-account-pay-error.tt", -- 2.39.5
Your charges