From a66eb6e86d58bad633020cbd02b147952ff2da31 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 2 Jul 2014 14:49:01 -0400 Subject: [PATCH] Bug 12482 [QA Followup] Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- admin/aqbudgetperiods.pl | 4 ++-- admin/aqbudgets.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index c3f969197f..6cf78332a4 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -72,7 +72,7 @@ my $op = $input->param('op')||"else"; # get only the columns of aqbudgetperiods in budget_period_hashref my @columns = Koha::Database->new()->schema->source('Aqbudgetperiod')->columns; -my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) ) : () } keys($input->Vars) } ; +my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) ) : () } keys( %{$input->Vars()} ) } ; $budget_period_hashref->{budget_period_startdate} = dt_from_string( $input->param('budget_period_startdate') ); $budget_period_hashref->{budget_period_enddate} = dt_from_string( $input->param('budget_period_enddate') ); @@ -222,7 +222,7 @@ elsif ( $op eq 'duplicate_budget' ){ # get only the columns of aqbudgets my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns; - my $new_entry = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $$entry{$_} ) : () } keys($entry) }; + my $new_entry = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $$entry{$_} ) : () } keys(%$entry) }; # write it to db my $new_id = AddBudget($new_entry); $old_new{$old_id} = $new_id; diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index b8c77061d3..1a66c9c0f4 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -71,7 +71,7 @@ my $num=FormatNumber; # get only the columns of aqbudgets in budget_hash my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns; -my $budget_hash = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) ) : () } keys($input->Vars) } ; +my $budget_hash = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) ) : () } keys( %{$input->Vars()}) } ; my $budget_id = $input->param('budget_id'); my $budget_period_id = $input->param('budget_period_id'); -- 2.39.5