Bugzilla – Attachment 37754 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 C4/Items.pm
Bug-13813---Remove-C4Dates-from-C4Itemspm.patch (text/plain), 2.92 KB, created by
Marc Véron
on 2015-04-13 14:42:18 UTC
(
hide
)
Description:
Bug 13813 - Remove C4::Dates from C4/Items.pm
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-04-13 14:42:18 UTC
Size:
2.92 KB
patch
obsolete
>From ae8f65b9f9dd8d2c10d555859a5c8f9ace9e7728 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Thu, 12 Mar 2015 10:51:40 +0100 >Subject: [PATCH] Bug 13813 - Remove C4::Dates from C4/Items.pm > >This patch removes depraceted C4::Dates from C4/Items.pm >To test: > >Apply patch > >To test: >Add modify items. Checkout added item. >Verify that item handling works as before. > >Amended following comment #58 / MV >--- > C4/Items.pm | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 22a8bc2..f077948 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -25,7 +25,7 @@ use Carp; > use C4::Context; > use C4::Koha; > use C4::Biblio; >-use C4::Dates qw/format_date format_date_in_iso/; >+use Koha::DateUtils; > use MARC::Record; > use C4::ClassSource; > use C4::Log; >@@ -647,8 +647,8 @@ C<$itemnum> is the item number > sub ModDateLastSeen { > my ($itemnumber) = @_; > >- my $today = C4::Dates->new(); >- ModItem({ itemlost => 0, datelastseen => $today->output("iso") }, undef, $itemnumber); >+ my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); >+ ModItem({ itemlost => 0, datelastseen => $today }, undef, $itemnumber); > } > > =head2 DelItem >@@ -2102,7 +2102,7 @@ C<items.withdrawn> > > sub _set_defaults_for_add { > my $item = shift; >- $item->{dateaccessioned} ||= C4::Dates->new->output('iso'); >+ $item->{dateaccessioned} || output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); > $item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); > } > >@@ -2135,7 +2135,7 @@ sub _koha_new_item { > notforloan = ?, > damaged = ?, > itemlost = ?, >- withdrawn = ?, >+ withdrawn = ?, > itemcallnumber = ?, > coded_location_qualifier = ?, > restricted = ?, >@@ -2143,7 +2143,7 @@ sub _koha_new_item { > holdingbranch = ?, > paidfor = ?, > location = ?, >- permanent_location = ?, >+ permanent_location = ?, > onloan = ?, > issues = ?, > renewals = ?, >@@ -2153,14 +2153,14 @@ sub _koha_new_item { > ccode = ?, > itype = ?, > materials = ?, >- uri = ?, >+ uri = ?, > enumchron = ?, > more_subfields_xml = ?, > copynumber = ?, > stocknumber = ? > "; > my $sth = $dbh->prepare($query); >- my $today = C4::Dates->today('iso'); >+ my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); > $sth->execute( > $item->{'biblionumber'}, > $item->{'biblioitemnumber'}, >-- >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