Bugzilla – Attachment 136329 Details for
Bug 30947
Simplify date handling in CanbookBeIssued
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30947: (follow-up) Remove unnecessary object cloning
Bug-30947-follow-up-Remove-unnecessary-object-clon.patch (text/plain), 1.27 KB, created by
Joonas Kylmälä
on 2022-06-19 10:29:42 UTC
(
hide
)
Description:
Bug 30947: (follow-up) Remove unnecessary object cloning
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-06-19 10:29:42 UTC
Size:
1.27 KB
patch
obsolete
>From 93bdbb7416577db582366f98b163409ec3a60157 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Sun, 19 Jun 2022 10:22:39 +0000 >Subject: [PATCH] Bug 30947: (follow-up) Remove unnecessary object cloning >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >CalcDateDue() works on its own copy of the $startdate parameter >so the cloning in the calling end is not necessary. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > C4/Circulation.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 27ba1ee06c..73f2e5aa77 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -796,7 +796,7 @@ sub CanBookBeIssued { > my $circ_library = Koha::Libraries->find( _GetCircControlBranch($item_unblessed, $patron_unblessed) ); > > my $now = dt_from_string(); >- $duedate ||= CalcDateDue( $now->clone(), $effective_itemtype, $circ_library->branchcode, $patron_unblessed ); >+ $duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron_unblessed ); > if (DateTime->compare($duedate,$now) == -1 ) { # duedate cannot be before now > $needsconfirmation{INVALID_DATE} = output_pref($duedate); > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30947
:
135959
|
135960
|
136092
|
136093
|
136158
|
136159
| 136329