Bugzilla – Attachment 45645 Details for
Bug 13871
OverDrive message when user authentication fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13871 - perltidy build_patron_status
Bug-13871---perltidy-buildpatronstatus.patch (text/plain), 4.02 KB, created by
Kyle M Hall (khall)
on 2015-12-14 13:11:47 UTC
(
hide
)
Description:
Bug 13871 - perltidy build_patron_status
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-12-14 13:11:47 UTC
Size:
4.02 KB
patch
obsolete
>From f679f071213660b9bfa2db75427c4e2f8e37fd5e Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Mon, 23 Mar 2015 14:30:26 +1300 >Subject: [PATCH] Bug 13871 - perltidy build_patron_status > >perltidy build_patron_status() sub > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/SIP/Sip/MsgType.pm | 64 ++++++++++++++++++++++++++----------------------- > 1 file changed, 34 insertions(+), 30 deletions(-) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 1e06a19..81fe3ab 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -431,47 +431,51 @@ sub handle { > # information will be returned to the terminal. > # > sub build_patron_status { >- my ($patron, $lang, $fields, $server)= @_; >+ my ( $patron, $lang, $fields, $server ) = @_; > >- my $patron_pwd = $fields->{(FID_PATRON_PWD)}; >+ my $patron_pwd = $fields->{ (FID_PATRON_PWD) }; > my $resp = (PATRON_STATUS_RESP); > > if ($patron) { >- $resp .= patron_status_string($patron); >- $resp .= $lang . timestamp(); >- $resp .= add_field(FID_PERSONAL_NAME, $patron->name); >+ $resp .= patron_status_string($patron); >+ $resp .= $lang . Sip::timestamp(); >+ $resp .= add_field( FID_PERSONAL_NAME, $patron->name ); > >- # while the patron ID we got from the SC is valid, let's >- # use the one returned from the ILS, just in case... >- $resp .= add_field(FID_PATRON_ID, $patron->id); >- if ($protocol_version >= 2) { >- $resp .= add_field(FID_VALID_PATRON, 'Y'); >- # Patron password is a required field. >- $resp .= add_field(FID_VALID_PATRON_PWD, sipbool($patron->check_password($patron_pwd))); >- $resp .= maybe_add(FID_CURRENCY, $patron->currency); >- $resp .= maybe_add(FID_FEE_AMT, $patron->fee_amount); >- } >+ # while the patron ID we got from the SC is valid, let's >+ # use the one returned from the ILS, just in case... >+ $resp .= add_field( FID_PATRON_ID, $patron->id ); >+ if ( $protocol_version >= 2 ) { >+ $resp .= add_field( FID_VALID_PATRON, 'Y' ); >+ >+ # Patron password is a required field. >+ $resp .= >+ add_field( FID_VALID_PATRON_PWD, >+ sipbool( $patron->check_password($patron_pwd) ) ); >+ $resp .= maybe_add( FID_CURRENCY, $patron->currency ); >+ $resp .= maybe_add( FID_FEE_AMT, $patron->fee_amount ); >+ } > >- $resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg, $server ); >- $resp .= maybe_add( FID_SCREEN_MSG, $patron->{branchcode}, $server ) >- if ( $server->{account}->{send_patron_home_library_in_af} ); >+ $resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg ); >+ $resp .= maybe_add( FID_SCREEN_MSG, $patron->{branchcode} ) >+ if ( $server->{account}->{send_patron_home_library_in_af} ); > >- $resp .= maybe_add(FID_PRINT_LINE, $patron->print_line); >- } else { >- # Invalid patron id. Report that the user has no privs., >- # no personal name, and is invalid (if we're using 2.00) >- $resp .= 'YYYY' . (' ' x 10) . $lang . timestamp(); >- $resp .= add_field(FID_PERSONAL_NAME, ''); >+ $resp .= maybe_add( FID_PRINT_LINE, $patron->print_line ); >+ } >+ else { >+ # Invalid patron id. Report that the user has no privs., >+ # no personal name, and is invalid (if we're using 2.00) >+ $resp .= 'YYYY' . ( ' ' x 10 ) . $lang . Sip::timestamp(); >+ $resp .= add_field( FID_PERSONAL_NAME, '' ); > >- # the patron ID is invalid, but it's a required field, so >- # just echo it back >- $resp .= add_field(FID_PATRON_ID, $fields->{(FID_PATRON_ID)}); >+ # the patron ID is invalid, but it's a required field, so >+ # just echo it back >+ $resp .= add_field( FID_PATRON_ID, $fields->{ (FID_PATRON_ID) } ); > >- ($protocol_version >= 2) and >- $resp .= add_field(FID_VALID_PATRON, 'N'); >+ ( $protocol_version >= 2 ) >+ and $resp .= add_field( FID_VALID_PATRON, 'N' ); > } > >- $resp .= add_field(FID_INST_ID, $fields->{(FID_INST_ID)}); >+ $resp .= add_field( FID_INST_ID, $fields->{ (FID_INST_ID) } ); > return $resp; > } > >-- >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 13871
:
37539
|
37543
|
38451
|
38452
|
38453
|
38454
|
38455
|
45645
|
45646
|
45647
|
45648
|
45649
|
48386
|
48387
|
48388
|
48389
|
48390
|
48391
|
48392
|
48393
|
48667
|
48668
|
48669
|
48670
|
48671
|
48672
|
51421
|
51422