Bugzilla – Attachment 129044 Details for
Bug 29717
Too many DateTime manipulation in tools/additional-contents.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29717: Remove unecessary DT manipulations from tools/additional-contents.pl
Bug-29717-Remove-unecessary-DT-manipulations-from-.patch (text/plain), 1.61 KB, created by
Lucas Gass (lukeg)
on 2022-01-05 22:37:29 UTC
(
hide
)
Description:
Bug 29717: Remove unecessary DT manipulations from tools/additional-contents.pl
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-01-05 22:37:29 UTC
Size:
1.61 KB
patch
obsolete
>From 3fba24861cde4402d3aeb763203de36f922d02a0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 16 Dec 2021 16:44:30 +0100 >Subject: [PATCH] Bug 29717: Remove unecessary DT manipulations from > tools/additional-contents.pl > >DBIC handles DateTime correctly, no need for this output_pref call. > >Test plan: >Create a new content, set the dates, confirm they are set correctly >Modify the content, modify the dates, confirm they are stored correctly > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > tools/additional-contents.pl | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > >diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl >index e63a44a809..30ef99eb51 100755 >--- a/tools/additional-contents.pl >+++ b/tools/additional-contents.pl >@@ -87,21 +87,9 @@ elsif ( $op eq 'add_validate' ) { > > my $expirationdate; > if ( $cgi->param('expirationdate') ) { >- $expirationdate = output_pref( >- { >- dt => dt_from_string( scalar $cgi->param('expirationdate') ), >- dateformat => 'iso', >- dateonly => 1 >- } >- ); >+ $expirationdate = dt_from_string( scalar $cgi->param('expirationdate') ); > } >- my $published_on = output_pref( >- { >- dt => dt_from_string( scalar $cgi->param('published_on') ), >- dateformat => 'iso', >- dateonly => 1 >- } >- ); >+ my $published_on = dt_from_string( scalar $cgi->param('published_on') ); > my $number = $cgi->param('number'); > > my $success = 1; >-- >2.20.1
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 29717
:
128630
|
129044
|
129149