Bugzilla – Attachment 5841 Details for
Bug 6328
Fine in days does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
follow-up to deal with QA comments
0001-Bug-6328-follow-up-for-QA-comments.patch (text/plain), 5.42 KB, created by
Paul Poulain
on 2011-10-11 16:28:50 UTC
(
hide
)
Description:
follow-up to deal with QA comments
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-10-11 16:28:50 UTC
Size:
5.42 KB
patch
obsolete
>From d726789fee9eb8e26ae375ede7fea0341e252db3 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Tue, 11 Oct 2011 18:22:27 +0200 >Subject: [PATCH] Bug 6328 follow-up for QA comments > >* fixed documentation in C4/Auth_with_ldap.pm >* updated ILSDI/Utility.pm to work with debarred being a date >* updated Members.pm/patronflags to work with debarred being a date (copy/paste of BibLibre code that had not been backported) >* fixed opac-reserve to check correctly for debarred status > >I also have removed a duplicate line on circulation.pl when the patron was restricted = the information was displayed twice >--- > C4/Auth_with_ldap.pm | 3 ++- > C4/ILSDI/Utility.pm | 2 +- > C4/Members.pm | 18 ++++++++++-------- > .../prog/en/modules/circ/circulation.tt | 4 ---- > opac/opac-reserve.pl | 3 ++- > 5 files changed, 15 insertions(+), 15 deletions(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 5baa07f..80bbc14 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -356,7 +356,8 @@ C4::Auth - Authenticates Koha users > | dateexpiry | date | YES | | NULL | | > | gonenoaddress | tinyint(1) | YES | | NULL | | > | lost | tinyint(1) | YES | | NULL | | >- | debarred | tinyint(1) | YES | | NULL | | >+ | debarred | date | YES | | NULL | | >+ | debarredcomment | varchar(255) | YES | | NULL | | > | contactname | mediumtext | YES | | NULL | | > | contactfirstname | text | YES | | NULL | | > | contacttitle | text | YES | | NULL | | >diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm >index 8ee1224..bacabac 100644 >--- a/C4/ILSDI/Utility.pm >+++ b/C4/ILSDI/Utility.pm >@@ -94,7 +94,7 @@ sub CanBookBeReserved { > if ( $borrower->{lost} eq 1 ) { > $out = undef; > } >- if ( $borrower->{debarred} eq 1 ) { >+ if ( $borrower->{debarred} ) { > $out = undef; > } > my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} ); >diff --git a/C4/Members.pm b/C4/Members.pm >index d5ac9dc..b72086d 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -25,7 +25,7 @@ use strict; > use C4::Context; > use C4::Dates qw(format_date_in_iso); > use Digest::MD5 qw(md5_base64); >-use Date::Calc qw/Today Add_Delta_YM/; >+use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/; > use C4::Log; # logaction > use C4::Overdues; > use C4::Reserves; >@@ -489,13 +489,15 @@ sub patronflags { > $flaginfo{'noissues'} = 1; > $flags{'LOST'} = \%flaginfo; > } >- if ( $patroninformation->{'debarred'} >- && $patroninformation->{'debarred'} == 1 ) >- { >- my %flaginfo; >- $flaginfo{'message'} = 'Borrower is Debarred.'; >- $flaginfo{'noissues'} = 1; >- $flags{'DBARRED'} = \%flaginfo; >+ if ( $patroninformation->{'debarred'} && check_date( split( /-/, $patroninformation->{'debarred'} ) ) ) { >+ if ( Date_to_Days(Date::Calc::Today) < Date_to_Days( split( /-/, $patroninformation->{'debarred'} ) ) ) { >+ my %flaginfo; >+ $flaginfo{'debarredcomment'} = $patroninformation->{'debarredcomment'}; >+ $flaginfo{'message'} = $patroninformation->{'debarredcomment'}; >+ $flaginfo{'noissues'} = 1; >+ $flaginfo{'dateend'} = $patroninformation->{'debarred'}; >+ $flags{'DBARRED'} = \%flaginfo; >+ } > } > if ( $patroninformation->{'borrowernotes'} > && $patroninformation->{'borrowernotes'} ) >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 b2c9d1c..b16fb44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -573,10 +573,6 @@ No patron matched <span class="ex">[% message %]</span> > </form> > </li>[% END %] > >- [% IF ( dbarred ) %]<li class="blocker"> >- <span class="circ-hlt"> Restricted:</span> Patron's account is restricted <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=circ&status=0">Lift restriction</a> >-</li>[% END %] >- > [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li> > [% END %] > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 9b9301e..a9d3fd4 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -29,6 +29,7 @@ use C4::Dates qw/format_date/; > use C4::Context; > use C4::Members; > use C4::Branch; # GetBranches >+use C4::Overdues; > use C4::Debug; > # use Data::Dumper; > >@@ -256,7 +257,7 @@ if ( $borr->{lost} && ($borr->{lost} eq 1) ) { > lost => 1 > ); > } >-if ( $borr->{debarred} && ($borr->{debarred} eq 1) ) { >+if ( CheckBorrowerDebarred($borrowernumber) ) { > $noreserves = 1; > $template->param( > message => 1, >-- >1.7.4.1 >
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 6328
:
4074
|
4098
|
4152
|
4153
|
4154
|
4155
|
4156
|
4186
|
4187
|
4188
|
4277
|
5283
|
5561
|
5841
|
6019
|
6421
|
6429
|
7248