Bugzilla – Attachment 44741 Details for
Bug 14985
Remove C4::Dates from 6 files in folder C4/*.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14985: Simplify the date management in AddReserve
Bug-14985-Simplify-the-date-management-in-AddReser.patch (text/plain), 2.01 KB, created by
Jonathan Druart
on 2015-11-11 12:08:41 UTC
(
hide
)
Description:
Bug 14985: Simplify the date management in AddReserve
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-11-11 12:08:41 UTC
Size:
2.01 KB
patch
obsolete
>From 132491ed86f3deb0cde13d4f85c41e64010d3ff2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Nov 2015 12:07:05 +0000 >Subject: [PATCH] Bug 14985: Simplify the date management in AddReserve > >The code is much more readable using the str param of output_pref > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Reserves.pm | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 29a0aa5..fc76fc1 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -165,16 +165,10 @@ sub AddReserve { > > my $dbh = C4::Context->dbh; > >- $resdate = eval { output_pref( { dt => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }); } >- if ( $resdate ); >- $resdate = eval { output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); } >- unless ( $resdate ); >+ $resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) >+ or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); > >- if ($expdate) { >- $expdate = eval { output_pref( { dt => dt_from_string( $expdate), dateonly => 1, dateformat => 'iso' } ); }; >- } else { >- undef $expdate; # make reserves.expirationdate default to null rather than '0000-00-00' >- } >+ $expdate = output_pref({ str => $expdate, dateonly => 1, dateformat => 'iso' }); > > if ( C4::Context->preference('AllowHoldDateInFuture') ) { > >@@ -1978,7 +1972,7 @@ sub _koha_notify_reserve { > 'reserves' => $reserve, > 'items', $reserve->{'itemnumber'}, > }, >- substitute => { today => eval { output_pref( { dt => dt_from_string, dateonly => 1 } ); } }, >+ substitute => { today => output_pref( { dt => dt_from_string, dateonly => 1 } ) }, > ); > > my $notification_sent = 0; #Keeping track if a Hold_filled message is sent. If no message can be sent, then default to a print message. >-- >2.1.0
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 14985
:
43285
|
44439
|
44556
|
44621
|
44699
|
44700
|
44701
|
44739
|
44740
| 44741 |
44764
|
44765