From c3dce50a4fa265f6c06065e4774c0441fcc6dcb9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 2 Feb 2024 09:07:02 +0000 Subject: [PATCH] Bug 34478: Changes for opac-dismiss-message / opac-note.inc Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc | 1 + opac/opac-dismiss-message.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc index 9e12aeed28..71cea64f55 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc @@ -11,6 +11,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] diff --git a/opac/opac-dismiss-message.pl b/opac/opac-dismiss-message.pl index 789825c035..9c3efe6b25 100755 --- a/opac/opac-dismiss-message.pl +++ b/opac/opac-dismiss-message.pl @@ -26,6 +26,7 @@ use Koha::DateUtils qw( dt_from_string ); use Koha::Patrons; my $query = CGI->new; +my $op = $query->param('op') // q{}; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -40,7 +41,7 @@ my $patron = Koha::Patrons->find( $patron_id ); my $message_id = $query->param('message_id'); my $message = $patron->messages->find( $message_id ); -unless ( $message ) { +unless ( $op =~ /^cud-/ && $message ) { # exit early print $query->redirect("/cgi-bin/koha/opac-user.pl"); exit; -- 2.39.5