From: Elliott Davis Date: Mon, 19 Mar 2012 21:56:44 +0000 (-0500) Subject: Bug 5549 : fixed non-cloned date object in Add date for calendar, also removed erouno... X-Git-Tag: v3.08.00~239^2~6 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=da14b2f4bad75fc4c44c80fb8f21fba38ea3c76f;p=koha_gimpoz Bug 5549 : fixed non-cloned date object in Add date for calendar, also removed erounous dumper in moremember.pl that dumped entire issue --- diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 6a9affadbf..d2aa9b6f02 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -996,12 +996,12 @@ sub AddIssue { # check if we just renew the issue. # if ($actualissue->{borrowernumber} eq $borrower->{'borrowernumber'}) { - $datedue = AddRenewal( - $borrower->{'borrowernumber'}, - $item->{'itemnumber'}, - $branch, - $datedue, - $issuedate, # here interpreted as the renewal date + $datedue = AddRenewal( + $borrower->{'borrowernumber'}, + $item->{'itemnumber'}, + $branch, + $datedue, + $issuedate, # here interpreted as the renewal date ); } else { @@ -1016,7 +1016,6 @@ sub AddIssue { } MoveReserve( $item->{'itemnumber'}, $borrower->{'borrowernumber'}, $cancelreserve ); - # Starting process for transfer job (checking transfert and validate it if we have one) my ($datesent) = GetTransfers($item->{'itemnumber'}); if ($datesent) { diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index a3ad60c994..1e7299c083 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -83,7 +83,8 @@ sub _init { } sub addDate { - my ( $self, $base_date, $add_duration, $unit ) = @_; + my ( $self, $startdate, $add_duration, $unit ) = @_; + my $base_date = $startdate->clone(); if ( ref $add_duration ne 'DateTime::Duration' ) { $add_duration = DateTime::Duration->new( days => $add_duration ); }