Bugzilla – Attachment 129149 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.66 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-07 12:35:09 UTC
(
hide
)
Description:
Bug 29717: Remove unecessary DT manipulations from tools/additional-contents.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-07 12:35:09 UTC
Size:
1.66 KB
patch
obsolete
>From 4caac70276e7be02895a39d6166ddeb5c4d30538 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> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > 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.34.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