@@ -, +, @@ pl scripts - 'showname' is removed (never used) - fix scope var issue in opac-user.tt (BORROWER_INF.OPACPatronDetails vs --- C4/Members.pm | 10 ----- admin/aqbudgets.pl | 2 +- catalogue/detail.pl | 2 +- circ/circulation.pl | 2 +- circ/returns.pl | 8 ++-- circ/transferstoreceive.pl | 2 +- circ/waitingreserves.pl | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-account.tt | 2 +- .../bootstrap/en/modules/opac-messaging.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 39 +++++++++----------- offline_circ/list.pl | 2 +- opac/opac-account.pl | 8 +--- opac/opac-ics.pl | 3 -- opac/opac-messaging.pl | 6 +-- opac/opac-passwd.pl | 3 +- opac/opac-privacy.pl | 3 +- opac/opac-user.pl | 6 +-- 17 files changed, 39 insertions(+), 63 deletions(-) --- a/C4/Members.pm +++ a/C4/Members.pm @@ -242,16 +242,6 @@ sub GetMemberDetails { $borrower->{'flags'} = $flags; $borrower->{'authflags'} = $accessflagshash; - # For the purposes of making templates easier, we'll define a - # 'showname' which is the alternate form the user's first name if - # 'other name' is defined. - if ($borrower->{category_type} eq 'I') { - $borrower->{'showname'} = $borrower->{'othernames'}; - $borrower->{'showname'} .= " $borrower->{'firstname'}" if $borrower->{'firstname'}; - } else { - $borrower->{'showname'} = $borrower->{'firstname'}; - } - # Handle setting the true behavior for BlockExpiredPatronOpacActions $borrower->{'BlockExpiredPatronOpacActions'} = C4::Context->preference('BlockExpiredPatronOpacActions') --- a/admin/aqbudgets.pl +++ a/admin/aqbudgets.pl @@ -89,7 +89,7 @@ if ( $budget_period_id ) { # USED FOR PERMISSION COMPARISON LATER my $borrower_id = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'}; -my $user = GetMemberDetails($borrower_id); +my $user = C4::Members::GetMember( borrowernumber => $borrower_id ); my $user_branchcode = $user->{'branchcode'}; $template->param( --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -226,7 +226,7 @@ foreach my $item (@items) { # checking for holds my ($reservedate,$reservedfor,$expectedAt,undef,$wait) = GetReservesFromItemnumber($item->{itemnumber}); - my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0); + my $ItemBorrowerReserveInfo = C4::Members::GetMember( borrowernumber => $reservedfor); if (C4::Context->preference('HidePatronName')){ $item->{'hidepatronname'} = 1; --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -270,7 +270,7 @@ if ($findborrower) { # get the borrower information..... if ($borrowernumber) { - $borrower = GetMemberDetails( $borrowernumber, 0 ); + $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ); my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); # Warningdate is the date that the warning starts appearing --- a/circ/returns.pl +++ a/circ/returns.pl @@ -163,7 +163,7 @@ if ( $query->param('resbarcode') ) { # check if we have other reserves for this document, if we have a return send the message of transfer my ( $messages, $nextreservinfo ) = GetOtherReserves($item); - my ($borr) = GetMemberDetails( $nextreservinfo, 0 ); + my $borr = GetMember( borrowernumber => $nextreservinfo ); my $name = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'}; if ( $messages->{'transfert'} ) { $template->param( @@ -388,7 +388,7 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { my $reserve = $messages->{'ResFound'}; my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'}; - my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 ); + my $borr = C4::Members::GetMember( borrowernumber => $reserve->{'borrowernumber'} ); my $name = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'}; $template->param( wname => $name, @@ -414,7 +414,7 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { if ( $messages->{'ResFound'}) { my $reserve = $messages->{'ResFound'}; my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'}; - my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 ); + my $borr = C4::Members::GetMember( borrowernumber => $reserve->{'borrowernumber'} ); if ( $reserve->{'ResFound'} eq "Waiting" or $reserve->{'ResFound'} eq "Reserved" ) { if ( $reserve->{'ResFound'} eq "Waiting" ) { @@ -554,7 +554,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{hour} = $duedate->hour(); $ri{minute} = $duedate->minute(); $ri{duedate} = output_pref($duedate); - my ($b) = GetMemberDetails( $riborrowernumber{$_}, 0 ); + my $b = C4::Members::GetMember( borrowernumber => $riborrowernumber{$_} ); unless ( $dropboxmode ) { $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1); } else { --- a/circ/transferstoreceive.pl +++ a/circ/transferstoreceive.pl @@ -101,7 +101,7 @@ foreach my $br ( keys %$branches ) { # we check if we have a reserv for this transfer my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'}); if ( $checkreserv[0] ) { - my $getborrower = GetMemberDetails( $checkreserv[1] ); + my $getborrower = C4::Members::GetMember( borrowernumber => $checkreserv[1] ); $getransf{'borrowernum'} = $getborrower->{'borrowernumber'}; $getransf{'borrowername'} = $getborrower->{'surname'}; $getransf{'borrowerfirstname'} = $getborrower->{'firstname'}; --- a/circ/waitingreserves.pl +++ a/circ/waitingreserves.pl @@ -188,7 +188,7 @@ sub cancel { # if we have a result if ($nextreservinfo) { my %res; - my $borrowerinfo = GetMemberDetails( $nextreservinfo ); + my $borrowerinfo = C4::Members::GetMember( borrowernumber => $nextreservinfo ); my $iteminfo = GetBiblioFromItemNumber($item); if ( $messages->{'transfert'} ) { $res{messagetransfert} = $messages->{'transfert'}; --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt @@ -13,7 +13,7 @@
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -10,7 +10,7 @@
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -12,7 +12,7 @@ [% END # / IF bor_messages %] - [% FOREACH BORROWER_INF IN BORROWER_INFO %] -

Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %] +

Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]

-

Click here if you're not [% BORROWER_INF.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]

+

Click here if you're not [% BORROWER_INFO.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]

[% IF ( patronupdate ) %]

Thank you!

Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.

[% END %] @@ -55,16 +54,16 @@
[% END %] - [% IF ( BORROWER_INF.warndeparture ) %] + [% IF ( BORROWER_INFO.warndeparture ) %]
- Please note: Your card will expire on [% BORROWER_INF.warndeparture | $KohaDates %]. Please contact the library for more information. - [% IF ( BORROWER_INF.returnbeforeexpiry ) %] Also note that you must return all checked out items before your card expires.[% END %] + Please note: Your card will expire on [% BORROWER_INFO.warndeparture | $KohaDates %]. Please contact the library for more information. + [% IF ( BORROWER_INFO.returnbeforeexpiry ) %] Also note that you must return all checked out items before your card expires.[% END %]
[% END %] - [% IF ( BORROWER_INF.warnexpired ) %] + [% IF ( BORROWER_INFO.warnexpired ) %]
- Please note: Your account has expired as of [% BORROWER_INF.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account. + Please note: Your account has expired as of [% BORROWER_INFO.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.
[% END %] @@ -90,12 +89,12 @@