Bugzilla – Attachment 42989 Details for
Bug 14903
Remove C4::Dates from circ/circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14903 - Remove C4::Dates from circ/circulation.pl
Bug-14903---Remove-C4Dates-from-circcirculationpl.patch (text/plain), 6.45 KB, created by
Marc Véron
on 2015-10-01 07:58:41 UTC
(
hide
)
Description:
Bug 14903 - Remove C4::Dates from circ/circulation.pl
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-10-01 07:58:41 UTC
Size:
6.45 KB
patch
obsolete
>From 614d668f2d63a37736c5c2a016d2951727fc52b8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sun, 27 Sep 2015 08:34:02 +0200 >Subject: [PATCH] Bug 14903 - Remove C4::Dates from circ/circulation.pl > >Patch to remove deprectated C4::Dates from circ/circulation.pl > >To test: >- Apply patch >- Go to the checkout site (Home > Circulation > Checkouts) >- Verify that data displays properly (including for users with a card > that expires in the near future, see syspref 'NotifyBorrowerDeparture') >- Verify that due date works as before (with syspref 'SpecifyDueDate' on and off > >(Amended following comment #3) >--- > circ/circulation.pl | 17 +++++------------ > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 8 ++++---- > 2 files changed, 9 insertions(+), 16 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 8b2d8d8..07f87cb 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -30,7 +30,6 @@ use DateTime::Duration; > use C4::Output; > use C4::Print; > use C4::Auth qw/:DEFAULT get_session haspermission/; >-use C4::Dates qw/format_date/; > use C4::Branch; # GetBranches > use C4::Koha; # GetPrinter > use C4::Circulation; >@@ -167,12 +166,7 @@ if( $onsite_checkout && !$duedatespec_allow ) { > $datedue .= ' 23:59:00'; > } elsif( $duedatespec_allow ) { > if ($duedatespec) { >- if ($duedatespec =~ C4::Dates->regexp('syspref')) { >- $datedue = dt_from_string($duedatespec); >- } else { >- $invalidduedate = 1; >- $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec); >- } >+ output_pref({ dt => dt_from_string( $duedatespec ), dateformat => 'iso', dateonly => 1 }); > } > } > >@@ -259,7 +253,7 @@ if ($borrowernumber) { > noissues => ($force_allow_issue) ? 0 : "1", > forceallow => $force_allow_issue, > expired => "1", >- renewaldate => format_date("$renew_year-$renew_month-$renew_day") >+ renewaldate => "$renew_year-$renew_month-$renew_day" > ); > } > # check for NotifyBorrowerDeparture >@@ -268,7 +262,7 @@ if ($borrowernumber) { > Date_to_Days( $today_year, $today_month, $today_day ) ) > { > # borrower card soon to expire warn librarian >- $template->param("warndeparture" => format_date($borrower->{dateexpiry}), >+ $template->param("warndeparture" => $borrower->{dateexpiry}, > flagged => "1",); > if (C4::Context->preference('ReturnBeforeExpiry')){ > $template->param("returnbeforeexpiry" => 1); >@@ -287,8 +281,7 @@ if ($borrowernumber) { > ); > > if ( $borrower->{debarred} ne "9999-12-31" ) { >- $template->param( 'userdebarreddate' => >- C4::Dates::format_date( $borrower->{debarred} ) ); >+ $template->param( 'userdebarreddate' => $borrower->{debarred} ); > } > } > >@@ -531,7 +524,7 @@ $template->param( > printer => $printer, > printername => $printer, > was_renewed => $query->param('was_renewed') ? 1 : 0, >- expiry => format_date($borrower->{'dateexpiry'}), >+ expiry => $borrower->{'dateexpiry'}, > roadtype => $roadtype, > amountold => $amountold, > barcode => $barcode, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 064e308..4851ed6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -190,7 +190,7 @@ $(document).ready(function() { > </form> > </div> > >-[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %] >+[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %] > > [% IF additional_materials %] > <div id="materials" class="dialog message">Note about the accompanying materials: <br /> >@@ -720,7 +720,7 @@ No patron matched <span class="ex">[% message %]</span> > > [% IF ( warndeparture ) %] > <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon. >- Patron's card expires on [% expiry %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a> >+ Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a> > > </li> > [% END %] >@@ -733,7 +733,7 @@ No patron matched <span class="ex">[% message %]</span> > > [% IF ( expired ) %] > <li><span class="circ-hlt">Expiration:</span> Patron's card has expired. >- [% IF ( expiry ) %]Patron's card expired on [% expiry %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a> >+ [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a> > > </li> > [% END %] >@@ -751,7 +751,7 @@ No patron matched <span class="ex">[% message %]</span> > <span class="circ-hlt"> Restricted:</span> Patron's account is restricted > > [% IF ( userdebarreddate ) %] >- until [% userdebarreddate %] >+ until [% userdebarreddate | $KohaDates %] > [% END %] > > [% IF ( debarredcomment ) %] >-- >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 14903
:
42895
|
42989
|
43303
|
43958
|
44072
|
44096
|
44131
|
44137
|
44138