Bugzilla – Attachment 49148 Details for
Bug 16054
Plack - variable scope error in paycollect.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16054: Fix variable scope error in paycollect.pl
Bug-16054-Fix-variable-scope-error-in-paycollectpl.patch (text/plain), 2.10 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-03-14 19:09:59 UTC
(
hide
)
Description:
Bug 16054: Fix variable scope error in paycollect.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-03-14 19:09:59 UTC
Size:
2.10 KB
patch
obsolete
>From 17c45dab471b041a26605bc5c452594b6c91a11f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 11 Mar 2016 12:47:26 +0000 >Subject: [PATCH] Bug 16054: Fix variable scope error in paycollect.pl > >$borrower, $borrowernumber and $template and not visible in the >subroutine. >Using $b_ref and passing $template fixes the issue. > >Test plan: >Under plack, use the pay selected button. >On the paycollect page, you should see the image of the patron > >It certainly fixes some other bugs. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > members/paycollect.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/members/paycollect.pl b/members/paycollect.pl >index ad2467e..e9de655 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -141,7 +141,7 @@ if ( $total_paid and $total_paid ne '0.00' ) { > $total_paid = '0.00'; #TODO not right with pay_individual > } > >-borrower_add_additional_fields($borrower); >+borrower_add_additional_fields($borrower, $template); > > $template->param(%$borrower); > >@@ -157,7 +157,7 @@ $template->param( > output_html_with_http_headers $input, $cookie, $template->output; > > sub borrower_add_additional_fields { >- my $b_ref = shift; >+ my ( $b_ref, $template ) = @_; > > # some borrower info is not returned in the standard call despite being assumed > # in a number of templates. It should not be the business of this script but in lieu of >@@ -176,11 +176,11 @@ sub borrower_add_additional_fields { > $b_ref->{adultborrower} = 1; > } > >- my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber}); >+ my $patron_image = Koha::Patron::Images->find($b_ref->{borrowernumber}); > $template->param( picture => 1 ) if $patron_image; > > if (C4::Context->preference('ExtendedPatronAttributes')) { >- $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); >+ $b_ref->{extendedattributes} = GetBorrowerAttributes($b_ref->{borrowernumber}); > } > > $b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} ); >-- >2.7.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 16054
:
49006
|
49080
| 49148