From 5a58caad50e3167c5a14a71299ce399033570d86 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 Apr 2015 13:25:33 +0200 Subject: [PATCH] Bug 11603: Change the output filenames The output filename is notices_all_.[html|csv|ods] if no letter_code parameter is given. If 1 is given: notices__.[html|csv|ods] If 1+ are given: noties__...__.[html|csv|ods] Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/gather_print_notices.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index 0e8cee3694..d573f043d8 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -145,10 +145,10 @@ sub print_notices { } while ( my ( $branchcode, $branch_messages ) = each %$messages_by_branch ) { - my $letter_code = @letter_codes == 1 ? $letter_codes[0] : 'hold'; + my $letter_codes = @letter_codes == 0 ? 'all' : join '_', @letter_codes; my $filename = $split - ? "notices_$letter_code-" . $today->output('iso') . "-$branchcode.$format" - : "notices_$letter_code-" . $today->output('iso') . ".$format"; + ? "notices_$letter_codes-" . $today->output('iso') . "-$branchcode.$format" + : "notices_$letter_codes-" . $today->output('iso') . ".$format"; my $filepath = File::Spec->catdir( $output_directory, $filename ); if ( $format eq 'html' ) { generate_html({ -- 2.39.5