Lines 969-978
sub handle_patron_info {
Link Here
|
969 |
# charged items limit |
969 |
# charged items limit |
970 |
|
970 |
|
971 |
$resp .= add_field( FID_VALID_PATRON, 'Y' ); |
971 |
$resp .= add_field( FID_VALID_PATRON, 'Y' ); |
|
|
972 |
my $password_rc; |
972 |
if ( defined($patron_pwd) ) { |
973 |
if ( defined($patron_pwd) ) { |
973 |
|
974 |
|
974 |
# If patron password was provided, report whether it was right or not. |
975 |
# If patron password was provided, report whether it was right or not. |
975 |
$resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) ) ); |
976 |
$password_rc = $patron->check_password($patron_pwd); |
|
|
977 |
$resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $password_rc ) ); |
976 |
} |
978 |
} |
977 |
|
979 |
|
978 |
$resp .= maybe_add( FID_CURRENCY, $patron->currency ); |
980 |
$resp .= maybe_add( FID_CURRENCY, $patron->currency ); |
Lines 1000-1009
sub handle_patron_info {
Link Here
|
1000 |
# Custom protocol extension to report patron internet privileges |
1002 |
# Custom protocol extension to report patron internet privileges |
1001 |
$resp .= maybe_add( FID_INET_PROFILE, $patron->inet_privileges ); |
1003 |
$resp .= maybe_add( FID_INET_PROFILE, $patron->inet_privileges ); |
1002 |
|
1004 |
|
1003 |
$resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg, $server ); |
1005 |
my $msg = $patron->screen_msg; |
1004 |
$resp .= maybe_add( FID_SCREEN_MSG, $patron->{branchcode}, $server ) |
1006 |
if( defined( $patron_pwd ) && !$password_rc ) { |
1005 |
if ( $server->{account}->{send_patron_home_library_in_af} ); |
1007 |
$msg .= ' -- ' . INVALID_PW; |
1006 |
|
1008 |
} |
|
|
1009 |
if ( $server->{account}->{send_patron_home_library_in_af} ) { |
1010 |
$msg .= ' -- ' . $patron->{branchcode}; |
1011 |
} |
1012 |
$resp .= maybe_add( FID_SCREEN_MSG, $msg, $server ); |
1007 |
$resp .= maybe_add( FID_PRINT_LINE, $patron->print_line ); |
1013 |
$resp .= maybe_add( FID_PRINT_LINE, $patron->print_line ); |
1008 |
} else { |
1014 |
} else { |
1009 |
|
1015 |
|
Lines 1022-1027
sub handle_patron_info {
Link Here
|
1022 |
if ( $protocol_version >= 2 ) { |
1028 |
if ( $protocol_version >= 2 ) { |
1023 |
$resp .= add_field( FID_VALID_PATRON, 'N' ); |
1029 |
$resp .= add_field( FID_VALID_PATRON, 'N' ); |
1024 |
} |
1030 |
} |
|
|
1031 |
$resp .= maybe_add( FID_SCREEN_MSG, INVALID_CARD ); |
1025 |
} |
1032 |
} |
1026 |
|
1033 |
|
1027 |
$self->write_msg( $resp, undef, $server->{account}->{terminator}, $server->{account}->{encoding} ); |
1034 |
$self->write_msg( $resp, undef, $server->{account}->{terminator}, $server->{account}->{encoding} ); |
1028 |
- |
|
|