Bugzilla – Attachment 6019 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 for 6328
0001-Bug-6328-Fixes-for-comment-35.patch (text/plain), 3.59 KB, created by
Paul Poulain
on 2011-10-21 16:22:24 UTC
(
hide
)
Description:
follow-up for 6328
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-10-21 16:22:24 UTC
Size:
3.59 KB
patch
obsolete
>From 57b67e6a8b091a06df232e09c0a9fab24c93e66d Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Fri, 21 Oct 2011 17:23:36 +0200 >Subject: [PATCH] Bug 6328 Fixes for comment 35 > >* correctly indenting with tab the debarrcomment field >* setdebar.pl is called without status parameter, thus it is not working anymore. It's fixed & some dead code has been removed. To test : debar someone, then go to patron detail page and click "lift debarment" >* the test function had not been updated. The fix define a debarment date of 2099-12-31 (no limit) >--- > C4/Auth_with_ldap.pm | 2 +- > members/setdebar.pl | 18 +++++------------- > t/db_dependent/lib/KohaTest/Members/DebarMember.pm | 2 +- > 3 files changed, 7 insertions(+), 15 deletions(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 80bbc14..e871706 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -357,7 +357,7 @@ C4::Auth - Authenticates Koha users > | gonenoaddress | tinyint(1) | YES | | NULL | | > | lost | tinyint(1) | YES | | NULL | | > | debarred | date | YES | | NULL | | >- | debarredcomment | varchar(255) | YES | | NULL | | >+ | debarredcomment | varchar(255) | YES | | NULL | | > | contactname | mediumtext | YES | | NULL | | > | contactfirstname | text | YES | | NULL | | > | contacttitle | text | YES | | NULL | | >diff --git a/members/setdebar.pl b/members/setdebar.pl >index b12ab57..bc0bafb 100755 >--- a/members/setdebar.pl >+++ b/members/setdebar.pl >@@ -1,6 +1,7 @@ > #!/usr/bin/perl > > # Copyright 2000-2002 Katipo Communications >+# Parts copyright 2011 BibLibre > # > # This file is part of Koha. > # >@@ -40,22 +41,13 @@ $flagsrequired->{borrowers} = 1; > my ( $loggedinuser, $cookie, $sessionID ) = > checkauth( $input, 0, $flagsrequired ); > >-my $destination = $input->param("destination") || ''; >-my $cardnumber = $input->param("cardnumber"); > my $borrowernumber = $input->param('borrowernumber'); >-my $status = $input->param('status'); > > my $dbh = C4::Context->dbh; > my $sth = >- $dbh->prepare("Update borrowers set debarred = ? where borrowernumber = ?"); >-$sth->execute( $status, $borrowernumber ); >+ $dbh->prepare("Update borrowers set debarred = NULL where borrowernumber = ?"); >+$sth->execute( $borrowernumber ); > $sth->finish; > >-if ( $destination eq "circ" ) { >- print $input->redirect( >- "/cgi-bin/koha/circ/circulation.pl?findborrower=".$cardnumber); >-} >-else { >- print $input->redirect( >- "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber"); >-} >+print $input->redirect( >+ "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber"); >diff --git a/t/db_dependent/lib/KohaTest/Members/DebarMember.pm b/t/db_dependent/lib/KohaTest/Members/DebarMember.pm >index 9e27d66..bf61b8a 100644 >--- a/t/db_dependent/lib/KohaTest/Members/DebarMember.pm >+++ b/t/db_dependent/lib/KohaTest/Members/DebarMember.pm >@@ -21,7 +21,7 @@ sub simple_usage : Test( 6 ) { > ok( ! $details->{'flags'}->{'DBARRED'}, 'this member is NOT debarred' ); > > # Now, let's debar this member and see what happens >- my $success = C4::Members::DebarMember( $self->{'memberid'} ); >+ my $success = C4::Members::DebarMember( $self->{'memberid'}, '2099-12-31' ); > > ok( $success, 'we were able to debar the member' ); > >-- >1.7.5.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 6328
:
4074
|
4098
|
4152
|
4153
|
4154
|
4155
|
4156
|
4186
|
4187
|
4188
|
4277
|
5283
|
5561
|
5841
|
6019
|
6421
|
6429
|
7248