From 4e5922b38798c565e80e421175247aea0d92da1c Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Fri, 2 Nov 2012 10:02:30 +0100 Subject: [PATCH] Bug 8842 fix Plack scoping for holidays the internal sub add_holiday uses some variables that are defined in the main script, usual fix Signed-off-by: Jared Camins-Esakov Passed-QA-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov --- tools/newHolidays.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index ffe99a32f1..646276c4ef 100755 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -15,19 +15,19 @@ use DateTime; my $input = new CGI; my $dbh = C4::Context->dbh(); -my $branchcode = $input->param('newBranchName'); +our $branchcode = $input->param('newBranchName'); my $originalbranchcode = $branchcode; -my $weekday = $input->param('newWeekday'); -my $day = $input->param('newDay'); -my $month = $input->param('newMonth'); -my $year = $input->param('newYear'); +our $weekday = $input->param('newWeekday'); +our $day = $input->param('newDay'); +our $month = $input->param('newMonth'); +our $year = $input->param('newYear'); my $day1; my $month1; my $year1; my $dateofrange = $input->param('dateofrange'); -my $title = $input->param('newTitle'); -my $description = $input->param('newDescription'); -my $newoperation = $input->param('newOperation'); +our $title = $input->param('newTitle'); +our $description = $input->param('newDescription'); +our $newoperation = $input->param('newOperation'); my $allbranches = $input->param('allBranches'); my $calendardate = sprintf("%04d-%02d-%02d", $year, $month, $day); @@ -57,7 +57,7 @@ if ($description) { } # We make an array with holiday's days -my @holiday_list; +our @holiday_list; if ($year1 && $month1 && $day1){ my $first_dt = DateTime->new(year => $year, month => $month, day => $day); my $end_dt = DateTime->new(year => $year1, month => $month1, day => $day1); -- 2.39.5