Bugzilla – Attachment 42835 Details for
Bug 14873
Remove C4::Dates from reserve/request.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14873 - Remove C4::Dates from reserve/request.pl
Bug-14873---Remove-C4Dates-from-reserverequestpl.patch (text/plain), 3.29 KB, created by
Jonathan Druart
on 2015-09-24 10:16:31 UTC
(
hide
)
Description:
Bug 14873 - Remove C4::Dates from reserve/request.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-09-24 10:16:31 UTC
Size:
3.29 KB
patch
obsolete
>From 14462115bf8df9c2d9caff37959185e3fb598864 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sun, 20 Sep 2015 21:39:44 +0200 >Subject: [PATCH] Bug 14873 - Remove C4::Dates from reserve/request.pl > >This bug removes deprecated C4::Dates from reserve/request.pl > >To test: >- Apply patch >- In staff client, search a biblio and try to put a hold for a borrower (Home > Catalog > [Some Biblio] > Place a hold to [Some biblio]) > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > reserve/request.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index 0d82f1c..d32f7a0 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -39,7 +39,7 @@ use C4::Biblio; > use C4::Items; > use C4::Koha; > use C4::Circulation; >-use C4::Dates qw/format_date/; >+use Koha::DateUtils; > use C4::Utils::DataTables::Members; > use C4::Members; > use C4::Search; # enabled_staff_search_views >@@ -82,7 +82,7 @@ my $maxreserves; > my $warnings; > my $messages; > >-my $date = C4::Dates->today('iso'); >+my $date = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); > my $action = $input->param('action'); > $action ||= q{}; > >@@ -358,7 +358,7 @@ foreach my $biblionumber (@biblionumbers) { > my $ItemBorrowerReserveInfo = GetMember( borrowernumber => $reservedfor ); > > $item->{backgroundcolor} = 'reserved'; >- $item->{reservedate} = format_date($reservedate); >+ $item->{reservedate} = output_pref({ dt => dt_from_string( $reservedate ), dateonly => 1 }); > $item->{ReservedForBorrowernumber} = $reservedfor; > $item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'}; > $item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'}; >@@ -393,7 +393,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 ), dateonly => 1 }); > $item->{transfertfrom} = > $branches->{$transfertfrom}{branchname}; > $item->{transfertto} = $branches->{$transfertto}{branchname}; >@@ -516,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'} ), 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'} ), dateonly => 1 }); > $reserve{'borrowernumber'} = $res->{'borrowernumber'}; > $reserve{'biblionumber'} = $res->{'biblionumber'}; > $reserve{'borrowernumber'} = $res->{'borrowernumber'}; >-- >2.1.0
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 14873
:
42790
|
42806
| 42835