From 36396724f779edfbe54ae2aa5b3d7653c7051e68 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 Apr 2015 13:25:33 +0200 Subject: [PATCH] [PASSED QA] 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 --- 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 cb2be9d..0bb185f 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -141,10 +141,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({ -- 1.7.10.4