Bugzilla – Attachment 45560 Details for
Bug 15344
GetMemberDetails called unecessary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15344: Remove some other calls of GetMemberDetails from pl scripts
Bug-15344-Remove-some-other-calls-of-GetMemberDeta.patch (text/plain), 26.77 KB, created by
Jonathan Druart
on 2015-12-10 10:01:01 UTC
(
hide
)
Description:
Bug 15344: Remove some other calls of GetMemberDetails from pl scripts
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-10 10:01:01 UTC
Size:
26.77 KB
patch
obsolete
>From 80fae7eaf9b9d9387c8e5dd6efb067cfcb353f55 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 9 Dec 2015 17:41:04 +0000 >Subject: [PATCH] Bug 15344: Remove some other calls of GetMemberDetails from > pl scripts > >Same as previously. >For these files it's a bit less obvious. >To make sure these changes won't introduce any regression, check that >the variable returned by GetMember is never used to get something >else than a borrower fields. >The 'flags' should not be get neither. >For opac-user.tt it's different, other keys are got but there are defined >in the pl script. > >On the way: >- 'showname' is removed (never used) >- fix scope var issue in opac-user.tt (BORROWER_INF.OPACPatronDetails vs >OPACPatronDetails) >--- > 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(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 19a7cfc..fafa02f 100644 >--- a/C4/Members.pm >+++ b/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') >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index d78ba12..3e7e14f 100755 >--- a/admin/aqbudgets.pl >+++ b/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( >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index acae4bc..96e7752 100755 >--- a/catalogue/detail.pl >+++ b/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; >diff --git a/circ/circulation.pl b/circ/circulation.pl >index f16475e..675c5d6 100755 >--- a/circ/circulation.pl >+++ b/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 >diff --git a/circ/returns.pl b/circ/returns.pl >index 893accd..f7fb52c 100755 >--- a/circ/returns.pl >+++ b/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 { >diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl >index b369822..4be2bcb 100755 >--- a/circ/transferstoreceive.pl >+++ b/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'}; >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index 3e1b5c2..a1a8da8 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -185,7 +185,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'}; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index e26776c..316c5bd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -13,7 +13,7 @@ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >- <li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]</a>[% END %] <span class="divider">›</span></li> >+ <li>[% IF BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INFO.firstname %] [% BORROWER_INFO.surname %]</a>[% END %] <span class="divider">›</span></li> > <li><a href="#">Your fines and charges</a></li> > </ul> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index b27756f..1f30489 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -10,7 +10,7 @@ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >- <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]</a> <span class="divider">›</span></li> >+ <li><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INFO.firstname %] [% BORROWER_INFO.surname %]</a> <span class="divider">›</span></li> > <li><a href="#">Your messaging settings</a></li> > </ul> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 4bb2632..6022223 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -12,7 +12,7 @@ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >- <li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% 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 %]</a>[% END %] <span class="divider">›</span></li> >+ <li><a href="/cgi-bin/koha/opac-user.pl">[% 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 %]</a> <span class="divider">›</span></li> > <li><a href="#">Your summary</a></li> > </ul> > >@@ -40,11 +40,10 @@ > </ul> > </div> > [% END # / IF bor_messages %] >- [% FOREACH BORROWER_INF IN BORROWER_INFO %] >- <h2>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 %] >+ <h2>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 %] > </h2> > >- <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">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 %]</a></p> >+ <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">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 %]</a></p> > > [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %] > >@@ -55,16 +54,16 @@ > </div> > [% END %] > >- [% IF ( BORROWER_INF.warndeparture ) %] >+ [% IF ( BORROWER_INFO.warndeparture ) %] > <div class="alert" id="warndeparture"> >- <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INF.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span> >- [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %] >+ <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INFO.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span> >+ [% IF ( BORROWER_INFO.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %] > </div> > [% END %] > >- [% IF ( BORROWER_INF.warnexpired ) %] >+ [% IF ( BORROWER_INFO.warnexpired ) %] > <div class="alert" id="warnexpired"> >- <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INF.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span> >+ <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INFO.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span> > </div> > [% END %] > >@@ -90,12 +89,12 @@ > <div class="alert"> > <ul> > [% IF ( userdebarred ) %] >- <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INF.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INF.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li> >+ <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INFO.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li> > [% END %] >- [% IF ( BORROWER_INF.gonenoaddress ) %] >- <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li> >+ [% IF ( BORROWER_INFO.gonenoaddress ) %] >+ <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS OPACPatronDetails %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file. Please contact the library[% IF OPACPatronDetails %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li> > [% END %] >- [% IF ( BORROWER_INF.lost ) %] >+ [% IF ( BORROWER_INFO.lost ) %] > <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li> > [% END %] > [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %] >@@ -292,41 +291,41 @@ > > [% IF ( OPACFinesTab ) %] > <!-- FINES BOX --> >- [% IF ( BORROWER_INF.amountoverfive ) %] >+ [% IF BORROWER_INFO.amountoverfive %] > <div id="opac-user-fines"> <h3>Fines and charges</h3> > <table class="table table-bordered table-striped"> > <thead><tr><th colspan="2">Amount</th></tr></thead> > <tbody> > <tr> > <td>You currently owe fines and charges amounting to:</td> >- <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td> >+ <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td> > </tr> > </tbody> > </table> > </div> > [% END %] > >- [% IF ( BORROWER_INF.amountoverzero ) %] >+ [% IF BORROWER_INFO.amountoverzero %] > <div id="opac-user-fines"> <h3>Fines and charges</h3> > <table class="table table-bordered table-striped"> > <thead><tr><th colspan="2">Amount</th></tr></thead> > <tbody> > <tr> > <td>You currently owe fines and charges amounting to:</td> >- <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td> >+ <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td> > </tr> > </tbody> > </table> > </div> > [% END %] > >- [% IF ( BORROWER_INF.amountlessthanzero ) %] >+ [% IF BORROWER_INFO.amountlessthanzero %] > <div id="opac-user-fines"> <h3>Credits</h3> > <table class="table table-bordered table-striped"> > <thead><tr><th colspan="2">Amount</th></tr></thead> > <tbody> > <tr> >- <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td> >+ <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td> > </tr> > </tbody> > </table> >@@ -334,8 +333,6 @@ > [% END %] > [% END # / OPACFinesTab %] > >- [% END # / FOREACH BORROWER_INFO %] >- > [% IF ( waiting_count && atdestination ) %] > <div id="opac-user-waiting"> > <table id="waitingt" class="table table-bordered table-striped"> >diff --git a/offline_circ/list.pl b/offline_circ/list.pl >index e7e71d4..87e830a 100755 >--- a/offline_circ/list.pl >+++ b/offline_circ/list.pl >@@ -47,7 +47,7 @@ for (@$operations) { > my $biblio = GetBiblioFromItemNumber(undef, $_->{'barcode'}); > $_->{'bibliotitle'} = $biblio->{'title'}; > $_->{'biblionumber'} = $biblio->{'biblionumber'}; >- my $borrower = GetMemberDetails(undef,$_->{'cardnumber'}); >+ my $borrower = C4::Members::GetMember( cardnumber => $_->{'cardnumber'} ); > if ($borrower) { > $_->{'borrowernumber'} = $borrower->{'borrowernumber'}; > $_->{'borrower'} = ($borrower->{'firstname'}?$borrower->{'firstname'}:'').' '.$borrower->{'surname'}; >diff --git a/opac/opac-account.pl b/opac/opac-account.pl >index 02bd4dc..d220fed 100755 >--- a/opac/opac-account.pl >+++ b/opac/opac-account.pl >@@ -38,12 +38,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-# get borrower information .... >-my $borr = GetMemberDetails( $borrowernumber ); >-my @bordat; >-$bordat[0] = $borr; >- >-$template->param( BORROWER_INFO => \@bordat ); >+my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ); >+$template->param( BORROWER_INFO => $borrower ); > > #get account details > my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); >diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl >index 0f5cbf9..f92d5aa 100755 >--- a/opac/opac-ics.pl >+++ b/opac/opac-ics.pl >@@ -47,9 +47,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-# get borrower information .... >-my ( $borr ) = GetMemberDetails( $borrowernumber ); >- > # Create Calendar > my $calendar = Data::ICal->new(); > >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index dfd273a..8ccc500 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -44,7 +44,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-my $borrower = GetMemberDetails( $borrowernumber ); >+my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ); > my $messaging_options = C4::Members::Messaging::GetMessagingOptions(); > > if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { >@@ -52,7 +52,7 @@ if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { > if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms ) { > ModMember( borrowernumber => $borrowernumber, > smsalertnumber => $sms ); >- $borrower = GetMemberDetails( $borrowernumber ); >+ $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ); > } > > C4::Form::MessagingPreferences::handle_form_action($query, { borrowernumber => $borrowernumber }, $template); >@@ -60,7 +60,7 @@ if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { > > C4::Form::MessagingPreferences::set_form_values({ borrowernumber => $borrower->{'borrowernumber'} }, $template); > >-$template->param( BORROWER_INFO => [ $borrower ], >+$template->param( BORROWER_INFO => $borrower, > messagingview => 1, > SMSnumber => $borrower->{'smsalertnumber'}, > SMSSendDriver => C4::Context->preference("SMSSendDriver"), >diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl >index c1d8ecd..4b33413 100755 >--- a/opac/opac-passwd.pl >+++ b/opac/opac-passwd.pl >@@ -44,8 +44,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-# get borrower information .... >-my ( $borr ) = GetMemberDetails( $borrowernumber ); >+my $borr = C4::Members::GetMember( borrowernumber => $borrowernumber ); > my $minpasslen = C4::Context->preference("minPasswordLength"); > if ( C4::Context->preference("OpacPasswordChange") ) { > my $sth = $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?"); >diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl >index 6b8c495..2a98d8f 100755 >--- a/opac/opac-privacy.pl >+++ b/opac/opac-privacy.pl >@@ -65,8 +65,9 @@ if ($op eq "delete_record") { > $template->param( 'err_history_not_deleted' => 1 ); > } > } >+ > # get borrower privacy .... >-my ( $borr ) = GetMemberDetails( $borrowernumber ); >+my $borr = C4::Members::GetMember( borrowernumber => $borrowernumber ); > > $template->param( 'Ask_data' => '1', > 'privacy'.$borr->{'privacy'} => 1, >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 54c9295..9d0e97f 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -123,9 +123,6 @@ if ( $borr->{'amountoutstanding'} < 0 ) { > > $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; > >-my @bordat; >-$bordat[0] = $borr; >- > # Warningdate is the date that the warning starts appearing > if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) { > my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day ); >@@ -144,12 +141,11 @@ if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') > # pass on any renew errors to the template for displaying > my $renew_error = $query->param('renew_error'); > >-$template->param( BORROWER_INFO => \@bordat, >+$template->param( BORROWER_INFO => $borr, > borrowernumber => $borrowernumber, > patron_flagged => $borr->{flagged}, > OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0, > surname => $borr->{surname}, >- showname => $borr->{showname}, > RENEW_ERROR => $renew_error, > borrower => $borr, > ); >-- >2.1.0
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 15344
:
45553
|
45560
|
45604
|
45605
|
45848
|
45849
|
46121
|
46129