From 93e979849df9728b98e98f504015a4b4b8fd8e46 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Thu, 11 Jul 2013 12:39:16 +0200 Subject: [PATCH 5/5] Bug 6739 - expired patrons not blocked from opac actions - Followup 4 Some corrections : - opac-reserve.tt : opening

instead of closing - opac-user.tt : warnexpired was in database format, adds the use of KohaDates template plugin - opac-user.tt : duplicated TT test : [% IF ( BORROWER_INF.warnexpired ) %] and [% ELSIF ( BORROWER_INF.warnexpired ) %], maybe a merge error - opac-user.tt : instead of , maybe for HTML 6 :-) - opac-user.pl : adding dateformat var to template is already done by Auth.pm Signed-off-by: Kyle M Hall --- C4/Members.pm | 1 + koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 8 ++------ opac/opac-user.pl | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 049c865..049aa4f 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -355,6 +355,7 @@ sub GetMemberDetails { return; } my $borrower = $sth->fetchrow_hashref; + return unless $borrower; my ($amount) = GetMemberAccountRecords( $borrowernumber); $borrower->{'amountoutstanding'} = $amount; # FIXME - patronflags calls GetMemberAccountRecords... just have patronflags return $amount diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index 44bde8f..af3d5b8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -231,7 +231,7 @@

ERROR: Internal error: incomplete hold request.
[% END %] [% IF ( expired_patron ) %] -

Sorry, you cannot place holds because your library card has expired.

Please contact your librarian if you wish to renew your card

+

Sorry, you cannot place holds because your library card has expired.

Please contact your librarian if you wish to renew your card

[% END %] [% ELSE %] [% IF ( none_available ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 0b99fc6..fffd4f1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -119,17 +119,13 @@ [% IF ( BORROWER_INF.warnexpired ) %]
- Please note: Your account has expired. Please contact the library for more information. -
- [% ELSIF ( BORROWER_INF.warnexpired ) %] -
- Please note: You account has expired as of [% BORROWER_INF.warnexpired %]. Please contact the library if you wish to renew your account. + Please note: You account has expired as of [% BORROWER_INF.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.
[% END %] [% IF ( RENEW_ERROR ) %]
- Please note: + Please note: Your account renewal failed because of the following: [% FOREACH error IN RENEW_ERROR.split('\|') %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index d8028aa..3e69aef 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -358,7 +358,6 @@ $template->param( patronupdate => $patronupdate, OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"), userview => 1, - dateformat => C4::Context->preference("dateformat"), ); $template->param( -- 1.7.10.4