From 777b505592454932d90a46732e3972103aead2fd Mon Sep 17 00:00:00 2001 From: Imani Thomas Date: Mon, 10 Nov 2025 13:26:50 +0000 Subject: [PATCH] Bug 21627: ran perl misc/devel/tidy.pl --- .../data/mysql/atomicupdate/bug_21627.pl | 6 +++-- .../prog/en/includes/prefs-menu.inc | 5 +++-- misc/cronjobs/gather_print_notices.pl | 22 +++++++------------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_21627.pl b/installer/data/mysql/atomicupdate/bug_21627.pl index ce9258cf53..84be3ded97 100755 --- a/installer/data/mysql/atomicupdate/bug_21627.pl +++ b/installer/data/mysql/atomicupdate/bug_21627.pl @@ -9,12 +9,14 @@ return { my ( $dbh, $out ) = @$args{qw(dbh out)}; # Do you stuffs here - $dbh->do(q{ + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('SendPrintNoticesEmails','','','What email addresses should send_print_notices.pl send to?','Free'), - ('SendPrintNoticesCombineEmails','1',NULL,'If we have emails in the flag and the system preference should we combine them or just use the system preference?','YesNo')}); + ('SendPrintNoticesCombineEmails','1',NULL,'If we have emails in the flag and the system preference should we combine them or just use the system preference?','YesNo')} + ); say $out "Added new system preferences 'SendPrintNoticesEmails' and 'SendPrintNoticesCombineEmails"; }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc index c0ff1e66cf..567d19e100 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc @@ -70,9 +70,10 @@
  • Cronjobs [% PROCESS subtabs %] +
  • [% END %] -
  • - Cronjobs +
  • + Cronjobs
  • [% IF ( enhanced_content ) %] diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index 759ee0c68b..a1f4456ded 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -58,22 +58,16 @@ if ( !$output_directory || !-d $output_directory || !-w $output_directory ) { ); } my $sys_pref_emails = C4::Context->preference("SendPrintNoticesEmails"); -if($sys_pref_emails) -{ - my @split_pref_emails = split(/,/, $sys_pref_emails); - my $sys_pref_combine = C4::Context->preference("SendPrintNoticesCombineEmails"); - if($sys_pref_combine) - { - @emails = (@emails, @split_pref_emails); - } - else - { +if ($sys_pref_emails) { + my @split_pref_emails = split( /,/, $sys_pref_emails ); + my $sys_pref_combine = C4::Context->preference("SendPrintNoticesCombineEmails"); + if ($sys_pref_combine) { + @emails = ( @emails, @split_pref_emails ); + } else { @emails = @split_pref_emails; } -} -else -{ - cronlogaction({info => "SendPrintNotices system pref ignored because it was null or empty."}); +} else { + cronlogaction( { info => "SendPrintNotices system pref ignored because it was null or empty." } ); } # uncomment the line below to test the system pref even if you have no files to send -- 2.39.5