Bugzilla – Attachment 4437 Details for
Bug 6487
No error explanation if patron expiration date is missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-6487-No-error-explanation-if-patron-expi.patch (text/plain), 2.98 KB, created by
Owen Leonard
on 2011-06-09 14:26:56 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-06-09 14:26:56 UTC
Size:
2.98 KB
patch
obsolete
>From 24ca24b4bfe1b5ca09315a493713f5245e862619 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 9 Jun 2011 09:27:35 -0400 >Subject: [PATCH] Fix for Bug 6487 - No error explanation if patron expiration date is missing >Content-Type: text/plain; charset="utf-8" > >The script tries to parse the patron expiration date without >checking that it is a valid date. If expiration date is empty >it doesn't get caught along with past expiration dates. > >I wonder if this line was supposed to catch this problem: > >Line 233: if ( $warning_year*$warning_month*$warning_day==0 > >This patch adds "!$borrower->{'dateexpiry'} ||" to that line. >--- > circ/circulation.pl | 4 ++-- > .../prog/en/modules/circ/circulation.tt | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 8c359b1..c34db54 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -230,7 +230,7 @@ if ($borrowernumber) { > 0 , $borrower->{'enrolmentperiod'}); > } > # if the expiry date is before today ie they have expired >- if ( $warning_year*$warning_month*$warning_day==0 >+ if ( !$borrower->{'dateexpiry'} || $warning_year*$warning_month*$warning_day==0 > || Date_to_Days($today_year, $today_month, $today_day ) > > Date_to_Days($warning_year, $warning_month, $warning_day) ) > { >@@ -238,7 +238,7 @@ if ($borrowernumber) { > $template->param( > flagged => "1", > noissues => "1", >- expired => format_date($borrower->{dateexpiry}), >+ expired => "1", > renewaldate => format_date("$renew_year-$renew_month-$renew_day") > ); > } >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 afa6ec5..d2f6405 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -554,7 +554,7 @@ No patron matched <span class="ex">[% message %]</span> > > [% IF ( expired ) %] > <li><span class="circ-hlt">Expiration:</span> Patron's card has expired. >- Patron's card expired 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> >+ [% 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> > > </li> > [% END %] >-- >1.7.3 >
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 6487
:
4436
| 4437