Bugzilla – Attachment 48142 Details for
Bug 15548
New patron related code should have been put to Patron instead of Borrower
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15548 [QA Followup] - More new uses of Koha::Borrower
Bug-15548-QA-Followup---More-new-uses-of-KohaBorro.patch (text/plain), 3.69 KB, created by
Kyle M Hall (khall)
on 2016-02-16 15:36:34 UTC
(
hide
)
Description:
Bug 15548 [QA Followup] - More new uses of Koha::Borrower
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-02-16 15:36:34 UTC
Size:
3.69 KB
patch
obsolete
>From 4619bea9a915b36cbab60f4fed0f22e657a34e72 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Sun, 14 Feb 2016 12:55:08 +0000 >Subject: [PATCH] Bug 15548 [QA Followup] - More new uses of Koha::Borrower > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Passwordrecovery.pm | 2 +- > Koha/SMS/Provider.pm | 4 ++-- > opac/opac-password-recovery.pl | 6 +++--- > t/db_dependent/Passwordrecovery.t | 4 ++-- > 4 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Passwordrecovery.pm b/C4/Passwordrecovery.pm >index ea01e15..a67c4d4 100644 >--- a/C4/Passwordrecovery.pm >+++ b/C4/Passwordrecovery.pm >@@ -103,7 +103,7 @@ sub GetValidLinkInfo { > =cut > > sub SendPasswordRecoveryEmail { >- my $borrower = shift; # Koha::Borrower >+ my $borrower = shift; # Koha::Patron > my $userEmail = shift; #to_address (the one specified in the request) > my $update = shift; > >diff --git a/Koha/SMS/Provider.pm b/Koha/SMS/Provider.pm >index a9994d9..bbc9626 100644 >--- a/Koha/SMS/Provider.pm >+++ b/Koha/SMS/Provider.pm >@@ -21,7 +21,7 @@ use Modern::Perl; > > use Carp; > >-use Koha::Borrowers; >+use Koha::Patrons; > > use base qw(Koha::Object); > >@@ -47,7 +47,7 @@ Gives the number of patrons using this provider > sub patrons_using { > my ( $self ) = @_; > >- return Koha::Borrowers->search( { sms_provider_id => $self->id } )->count(); >+ return Koha::Patrons->search( { sms_provider_id => $self->id } )->count(); > } > > =head3 _type >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index 7e3eae2..aa98040 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -11,7 +11,7 @@ use C4::Context; > use C4::Passwordrecovery > qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery); > use Koha::AuthUtils qw(hash_password); >-use Koha::Borrowers; >+use Koha::Patrons; > my $query = new CGI; > use HTML::Entities; > >@@ -58,10 +58,10 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > > # Find the borrower by his userid or email > if ($username) { >- $search_results = [ Koha::Borrowers->search( { userid => $username } ) ]; >+ $search_results = [ Koha::Patrons->search( { userid => $username } ) ]; > } > elsif ($email) { >- $search_results = [ Koha::Borrowers->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ]; >+ $search_results = [ Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ]; > } > if ( not $search_results || scalar @$search_results > 1 ) { > $hasError = 1; >diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t >index e0ec8ec..a428033 100755 >--- a/t/db_dependent/Passwordrecovery.t >+++ b/t/db_dependent/Passwordrecovery.t >@@ -20,7 +20,7 @@ use Modern::Perl; > use C4::Context; > use C4::Letters; > use Koha::Database; >-use Koha::Borrowers; >+use Koha::Patrons; > > use Test::More tests => 16; > >@@ -134,7 +134,7 @@ ok( C4::Passwordrecovery::CompletePasswordRecovery($uuid2) == 0, "[CompletePassw > # C4::Passwordrecovery::SendPasswordRecoveryEmail # > ################################################### > >-my $borrower = shift [ Koha::Borrowers->search( { userid => $userid1 } ) ]; >+my $borrower = shift [ Koha::Patrons->search( { userid => $userid1 } ) ]; > ok( C4::Passwordrecovery::SendPasswordRecoveryEmail($borrower, $email1, 0) == 1, "[SendPasswordRecoveryEmail] Returns 1 on success" ); > my $letters = C4::Letters::GetQueuedMessages( { borrowernumber => $borrowernumber1, limit => 99 } ); > ok( scalar @$letters == 1, "[SendPasswordRecoveryEmail] There is a letter in the queue for our borrower"); >-- >2.1.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 15548
:
46489
|
46634
|
46728
|
46729
|
47103
|
47104
|
48111
|
48112
|
48142
|
48588
|
48589
|
48590