Bugzilla – Attachment 38951 Details for
Bug 14136
Remove superfluous template parameters from members/member-flags.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 14136: Remove superfluous template parameters from members/member-flags.pl
SIGNED-OFF-Bug-14136-Remove-superfluous-template-p.patch (text/plain), 3.27 KB, created by
Bernardo Gonzalez Kriegel
on 2015-05-07 14:38:07 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 14136: Remove superfluous template parameters from members/member-flags.pl
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-05-07 14:38:07 UTC
Size:
3.27 KB
patch
obsolete
>From ab1a88ddd37e4480475a190c2fe94af9c4eaba47 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Mon, 4 May 2015 15:17:04 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 14136: Remove superfluous template > parameters from members/member-flags.pl > >This bug was triggered because intranet-error.log had entries like the following: >member-flags.pl: Use of uninitialized value $roadtype in concatenation (.) or string at /usr/share/kohaclone/members/member-flags.pl line 176. > >To reproduce: Have a patron without roadtype and go to >Home > Patrons > Set permissions for ... > >There are some template parameters that are not used in the template member-flags.tt ( $roadtype is used while preparing $address ) > >Unused template params are: >cardnumber >othernames >categorycode >category_type >categoryname >address >address2 >city >state >zipcode >country >phone >phonepro >mobile >email >emailpro >branchcode >branchname >loop <--- this is used >is_child >activeBorrowerRelationship >RoutingSerials > >To test: >- Verify that you get the warning above in intranet-error.log >- Verify that the parameters above are not used in the template member-flags.tt >- Apply patch >- Verify that setting permissions for patrons still works > >Note: There are a lot of indenting issues in this file. This patch does not intend to resolve them. >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Warn exists, now removed. No errors >--- > members/member-flags.pl | 33 ++++----------------------------- > 1 file changed, 4 insertions(+), 29 deletions(-) > >diff --git a/members/member-flags.pl b/members/member-flags.pl >index 68c52aa..60f9d37 100755 >--- a/members/member-flags.pl >+++ b/members/member-flags.pl >@@ -171,36 +171,11 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > ); > } > >-# Computes full borrower address >-my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $bor->{streettype} ); >-my $address = $bor->{'streetnumber'} . " $roadtype " . $bor->{'address'}; >- > $template->param( >- borrowernumber => $bor->{'borrowernumber'}, >- cardnumber => $bor->{'cardnumber'}, >- surname => $bor->{'surname'}, >- firstname => $bor->{'firstname'}, >- othernames => $bor->{'othernames'}, >- categorycode => $bor->{'categorycode'}, >- category_type => $bor->{'category_type'}, >- categoryname => $bor->{'description'}, >- address => $address, >- address2 => $bor->{'address2'}, >- city => $bor->{'city'}, >- state => $bor->{'state'}, >- zipcode => $bor->{'zipcode'}, >- country => $bor->{'country'}, >- phone => $bor->{'phone'}, >- phonepro => $bor->{'phonepro'}, >- mobile => $bor->{'mobile'}, >- email => $bor->{'email'}, >- emailpro => $bor->{'emailpro'}, >- branchcode => $bor->{'branchcode'}, >- branchname => GetBranchName($bor->{'branchcode'}), >- loop => \@loop, >- is_child => ($bor->{'category_type'} eq 'C'), >- activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), >- RoutingSerials => C4::Context->preference('RoutingSerials'), >+ borrowernumber => $bor->{'borrowernumber'}, >+ surname => $bor->{'surname'}, >+ firstname => $bor->{'firstname'}, >+ loop => \@loop, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >-- >1.7.9.5
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 14136
:
38812
| 38951