Bugzilla – Attachment 36885 Details for
Bug 13813
Remove deprecated module C4::Dates from system - first steps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13813 - Remove C4::Dates from members/moremember.pl
Bug-13813---Remove-C4Dates-from-membersmorememberp.patch (text/plain), 2.06 KB, created by
Marc Véron
on 2015-03-15 11:07:44 UTC
(
hide
)
Description:
Bug 13813 - Remove C4::Dates from members/moremember.pl
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-03-15 11:07:44 UTC
Size:
2.06 KB
patch
obsolete
>From 025697e88b5a24cb2c52f80d6a1caf0b85b67071 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sun, 15 Mar 2015 12:05:06 +0100 >Subject: [PATCH] Bug 13813 - Remove C4::Dates from members/moremember.pl > >To test: >Apply patch >Go to a patron's Details page (moremember.pl) >Verify that dates display correctly (birth date, registration, espiration, manual restriction with date) >--- > members/moremember.pl | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/members/moremember.pl b/members/moremember.pl >index 92fe2d9..45cd3b4 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -42,7 +42,6 @@ use C4::Output; > use C4::Members; > use C4::Members::Attributes; > use C4::Members::AttributeTypes; >-use C4::Dates; > use C4::Reserves; > use C4::Circulation; > use C4::Koha; >@@ -134,7 +133,7 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { > $data->{$_} = ''; > next; > } >- $userdate = C4::Dates->new($userdate,'iso')->output('syspref'); >+ $userdate = output_pref({ dt => dt_from_string( $userdate, 'iso' ), dateonly => 1 }); > $data->{$_} = $userdate || ''; > $template->param( $_ => $userdate ); > } >@@ -148,7 +147,7 @@ if ( IsDebarred($borrowernumber) ) { > $template->param( 'userdebarred' => 1, 'flagged' => 1 ); > my $debar = $data->{'debarred'}; > if ( $debar ne "9999-12-31" ) { >- $template->param( 'userdebarreddate' => C4::Dates::format_date($debar) ); >+ $template->param( 'userdebarreddate' => output_pref({ dt => dt_from_string( $debar, 'iso' ), dateonly => 1 }) ); > $template->param( 'debarredcomment' => $data->{debarredcomment} ); > } > } >@@ -367,7 +366,7 @@ $template->param( > categoryname => $data->{'description'}, > was_renewed => $input->param('was_renewed') ? 1 : 0, > branch => $branch, >- todaysdate => C4::Dates->today(), >+ todaysdate => output_pref({ dt => DateTime->now(), dateonly => 1 }), > totalprice => sprintf("%.2f", $totalprice), > totaldue => sprintf("%.2f", $total), > totaldue_raw => $total, >-- >1.7.10.4
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 13813
:
36827
|
36828
|
36829
|
36830
|
36831
|
36832
|
36835
|
36836
|
36839
|
36845
|
36850
|
36851
|
36855
|
36857
|
36858
|
36859
|
36862
|
36863
|
36864
|
36865
|
36870
|
36871
|
36872
|
36878
|
36879
|
36880
|
36881
|
36882
|
36883
|
36884
|
36885
|
36886
|
36887
|
36888
|
36889
|
36890
|
36892
|
36893
|
36894
|
36895
|
36896
|
36897
|
36898
|
36899
|
36900
|
36901
|
36902
|
37227
|
37730
|
37731
|
37732
|
37736
|
37737
|
37746
|
37748
|
37749
|
37753
|
37754
|
37757
|
37762
|
37763
|
37764
|
37765
|
37766
|
37767
|
37768
|
37770
|
37810
|
37828
|
37835
|
37839
|
37840
|
37841
|
37842
|
37843
|
37853
|
37854
|
37855
|
37856
|
37857
|
37858
|
37859
|
37860
|
37861
|
37862
|
37863
|
37864
|
37865
|
37866
|
37867
|
37868
|
37869
|
37870
|
37871
|
37872
|
37873
|
37874
|
37875
|
37876
|
37877
|
37878
|
37879
|
37880
|
37881
|
37882
|
37883
|
37884
|
37885
|
37886
|
37887
|
37888
|
37889
|
37890
|
37891
|
39666
|
40894
|
42052
|
42175
|
42274
|
42286
|
42292
|
42293
|
42294