Bugzilla – Attachment 27581 Details for
Bug 12134
Members are restricted even if the debarment is ended
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12134 - Members are restricted even if the debarment is ended
PASSED-QA-Bug-12134---Members-are-restricted-even-.patch (text/plain), 2.48 KB, created by
Martin Renvoize
on 2014-04-25 08:54:10 UTC
(
hide
)
Description:
[PASSED QA] Bug 12134 - Members are restricted even if the debarment is ended
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2014-04-25 08:54:10 UTC
Size:
2.48 KB
patch
obsolete
>From 0b7ecaba508542506adcbce0829f1eacf3051da9 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 24 Apr 2014 11:23:05 -0400 >Subject: [PATCH] [PASSED QA] Bug 12134 - Members are restricted even if the > debarment is ended > >Test Plan: >1) Modify borrowers.debarred for a borrower and set the date in the past >2) Try to check out an item to that patron >3) Note you cannot >4) Apply this patch >5) Repeat step 2 >6) Note you can now check out items the patron > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Borrower/Debarments.pm | 2 +- > circ/circulation.pl | 18 +++++++++++------- > 2 files changed, 12 insertions(+), 8 deletions(-) > >diff --git a/Koha/Borrower/Debarments.pm b/Koha/Borrower/Debarments.pm >index 0febc20..5990208 100644 >--- a/Koha/Borrower/Debarments.pm >+++ b/Koha/Borrower/Debarments.pm >@@ -183,7 +183,7 @@ sub IsDebarred { > > return unless ($borrowernumber); > >- my $sql = "SELECT debarred FROM borrowers WHERE borrowernumber = ?"; >+ my $sql = "SELECT debarred FROM borrowers WHERE borrowernumber = ? AND debarred > CURRENT_DATE()"; > my $sth = C4::Context->dbh->prepare($sql); > $sth->execute($borrowernumber); > my ($debarred) = $sth->fetchrow_array(); >diff --git a/circ/circulation.pl b/circ/circulation.pl >index e02b569..216bfc3 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -40,7 +40,7 @@ use C4::Reserves; > use C4::Context; > use CGI::Session; > use C4::Members::Attributes qw(GetBorrowerAttributes); >-use Koha::Borrower::Debarments qw(GetDebarments); >+use Koha::Borrower::Debarments qw(GetDebarments IsDebarred); > use Koha::DateUtils; > > use Date::Calc qw( >@@ -265,12 +265,16 @@ if ($borrowernumber) { > finetotal => $fines > ); > >- $template->param( >- 'userdebarred' => $borrower->{debarred}, >- 'debarredcomment' => $borrower->{debarredcomment}, >- ); >- if ( $borrower->{debarred} ne "9999-12-31" ) { >- $template->param( 'userdebarreddate' => C4::Dates::format_date( $borrower->{debarred} ) ); >+ if ( IsDebarred($borrowernumber) ) { >+ $template->param( >+ 'userdebarred' => $borrower->{debarred}, >+ 'debarredcomment' => $borrower->{debarredcomment}, >+ ); >+ >+ if ( $borrower->{debarred} ne "9999-12-31" ) { >+ $template->param( 'userdebarreddate' => >+ C4::Dates::format_date( $borrower->{debarred} ) ); >+ } > } > > } >-- >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 12134
:
27544
|
27546
|
27547
| 27581 |
27582
|
27607