Bugzilla – Attachment 71000 Details for
Bug 13990
ILS-DI LookupPatron Requries ID Type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13990: Followup: silence warnings on testing
Bug-13990-Followup-silence-warnings-on-testing.patch (text/plain), 1.65 KB, created by
Mark Tompsett
on 2018-01-28 06:45:59 UTC
(
hide
)
Description:
Bug 13990: Followup: silence warnings on testing
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-01-28 06:45:59 UTC
Size:
1.65 KB
patch
obsolete
>From 02f0b21bddeac78062252719a2f69ffbde6a1efa Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 28 Jan 2018 01:41:01 -0500 >Subject: [PATCH] Bug 13990: Followup: silence warnings on testing > >prove t/db_dependent/ILSDI_Services.t > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/ILSDI/Services.pm | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index c0af05c..c9069af 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -310,20 +310,21 @@ Parameters: > sub LookupPatron { > my ($cgi) = @_; > >- my $patrons; >- >- if(!$cgi->param('id')) { >- return { message => 'PatronNotFound' }; >+ my $id = $cgi->param('id'); >+ if(!$id) { >+ return { message => 'PatronNotFound' }; > } > >- if($cgi->param('id_type')) { >- $patrons = Koha::Patrons->search( { $cgi->param('id_type') => $cgi->param('id') } ); >+ my $patrons; >+ my $passed_id_type = $cgi->param('id_type'); >+ if($passed_id_type) { >+ $patrons = Koha::Patrons->search( { $passed_id_type => $id } ); > } else { >- foreach my $id_type ('cardnumber', 'userid', 'email', 'borrowernumber', >+ foreach my $id_type ('cardnumber', 'userid', 'email', 'borrowernumber', > 'surname', 'firstname') { >- $patrons = Koha::Patrons->search( { $id_type => $cgi->param('id') } ); >- last if($patrons->count); >- } >+ $patrons = Koha::Patrons->search( { $id_type => $id } ); >+ last if($patrons->count); >+ } > } > unless ( $patrons->count ) { > return { message => 'PatronNotFound' }; >-- >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 13990
:
69004
|
70965
|
70966
|
70997
|
70998
|
70999
|
71000
|
71001
|
71002
|
71003
|
71004