Bugzilla – Attachment 36894 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 reserve/request.pl
Bug-13813---Remove-C4Dates-from-reserverequestpl.patch (text/plain), 3.07 KB, created by
Marc Véron
on 2015-03-15 14:14:14 UTC
(
hide
)
Description:
Bug 13813 - Remove C4::Dates from reserve/request.pl
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-03-15 14:14:14 UTC
Size:
3.07 KB
patch
obsolete
>From d7855a90390d6542b6c745444eb6c0578f96abb6 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sun, 15 Mar 2015 15:04:58 +0100 >Subject: [PATCH] Bug 13813 - Remove C4::Dates from reserve/request.pl > >To test: >Apply patch >Search a biblio in staff client and place hold. This will take you to reserve/request.pl >Add / Suspend / Unsuspend / hold(s) >Verify that all dates behave and display OK >--- > reserve/request.pl | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index ce0e70f..39bfbeb 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -39,7 +39,6 @@ use C4::Biblio; > use C4::Items; > use C4::Koha; > use C4::Circulation; >-use C4::Dates qw/format_date/; > use C4::Members; > use C4::Search; # enabled_staff_search_views > use Koha::DateUtils; >@@ -81,7 +80,7 @@ my $maxreserves; > my $warnings; > my $messages; > >-my $date = C4::Dates->today('iso'); >+my $date = output_pref({ dt => DateTime->now(), dateformat => 'iso', dateonly => 1 }); > my $action = $input->param('action'); > $action ||= q{}; > >@@ -351,7 +350,7 @@ foreach my $biblionumber (@biblionumbers) { > > if ( defined $reservedate ) { > $item->{backgroundcolor} = 'reserved'; >- $item->{reservedate} = format_date($reservedate); >+ $item->{reservedate} = output_pref({ dt => dt_from_string( $reservedate, 'iso' ), dateonly => 1 }); > $item->{ReservedForBorrowernumber} = $reservedfor; > $item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'}; > $item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'}; >@@ -386,7 +385,7 @@ foreach my $biblionumber (@biblionumbers) { > GetTransfers($itemnumber); > > if ( defined $transfertwhen && $transfertwhen ne '' ) { >- $item->{transfertwhen} = format_date($transfertwhen); >+ $item->{transfertwhen} = output_pref({ dt => dt_from_string( $transfertwhen, 'iso' ), dateonly => 1 }); > $item->{transfertfrom} = > $branches->{$transfertfrom}{branchname}; > $item->{transfertto} = $branches->{$transfertto}{branchname}; >@@ -517,9 +516,9 @@ foreach my $biblionumber (@biblionumbers) { > $reserve{'hidename'} = 1; > $reserve{'cardnumber'} = $reserveborrowerinfo->{'cardnumber'}; > } >- $reserve{'expirationdate'} = format_date( $res->{'expirationdate'} ) >+ $reserve{'expirationdate'} = output_pref({ dt => dt_from_string( $res->{'expirationdate'}, 'iso' ), dateonly => 1 }) > unless ( !defined($res->{'expirationdate'}) || $res->{'expirationdate'} eq '0000-00-00' ); >- $reserve{'date'} = format_date( $res->{'reservedate'} ); >+ $reserve{'date'} = output_pref({ dt => dt_from_string( $res->{'reservedate'}, 'iso' ), dateonly => 1 }); > $reserve{'borrowernumber'} = $res->{'borrowernumber'}; > $reserve{'biblionumber'} = $res->{'biblionumber'}; > $reserve{'borrowernumber'} = $res->{'borrowernumber'}; >-- >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