From b9ad842dee52633e5ae840c206a2c7588cf5b5dd Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 15 Sep 2023 07:01:24 +0000 Subject: [PATCH] Bug 34728: (QA follow-up) Remove o modifier, bit more compact Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit bda428399aa76057f0596883d5a619a27520a7c7) Signed-off-by: Fridolin Somers --- misc/cronjobs/gather_print_notices.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index d2bf8fc874..9e4cd44f0a 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -214,10 +214,8 @@ sub generate_html { C4::Templates::gettemplate( 'batch/print-notices.tt', 'intranet', CGI->new ); - foreach my $message (@{ $messages }) { - my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; - my $is_html = $content_type =~ m/html/io; - $message->{'is_html'} = $is_html; + foreach my $message (@$messages) { + $message->{is_html} = $message->{content_type} && $message->{content_type} =~ /html/i; } $template->param( -- 2.39.5