From 0dacc4f88d922358637c7ad26a8cb7ac6423dcb7 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 9 Oct 2015 10:39:12 -0300 Subject: [PATCH] Bug 14925: (QA followup) tidy code block Signed-off-by: Tomas Cohen Arazi --- members/moremember.pl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index d7932de..f0b583f 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -129,15 +129,15 @@ my $category_type = $data->{'category_type'}; $debug and printf STDERR "dates (enrolled,expiry,birthdate) raw: (%s, %s, %s)\n", map {$data->{$_}} qw(dateenrolled dateexpiry dateofbirth); foreach (qw(dateenrolled dateexpiry dateofbirth)) { - my $userdate = $data->{$_}; - unless ($userdate) { - $debug and warn sprintf "Empty \$data{%12s}", $_; - $data->{$_} = ''; - next; - } - $userdate = output_pref({ dt => dt_from_string( $userdate ), dateonly => 1 }); - $data->{$_} = $userdate || ''; - $template->param( $_ => $userdate ); + my $userdate = $data->{$_}; + unless ($userdate) { + $debug and warn sprintf "Empty \$data{%12s}", $_; + $data->{$_} = ''; + next; + } + $userdate = output_pref({ dt => dt_from_string( $userdate ), dateonly => 1 }); + $data->{$_} = $userdate || ''; + $template->param( $_ => $userdate ); } $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); @@ -343,7 +343,7 @@ $template->param( categoryname => $data->{'description'}, was_renewed => $input->param('was_renewed') ? 1 : 0, branch => $branch, - todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), + todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), totalprice => sprintf("%.2f", $totalprice), totaldue => sprintf("%.2f", $total), totaldue_raw => $total, -- 2.6.1