Bugzilla – Attachment 26411 Details for
Bug 11913
Attributes generate error log during member entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11913 - [SIGNED-OFF] Attributes generate error log during member entry
Bug-11913---SIGNED-OFF-Attributes-generate-error-l.patch (text/plain), 2.43 KB, created by
Jonathan Druart
on 2014-03-17 15:54:04 UTC
(
hide
)
Description:
Bug 11913 - [SIGNED-OFF] Attributes generate error log during member entry
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-03-17 15:54:04 UTC
Size:
2.43 KB
patch
obsolete
>From 191a58f9eb4a8a84ccae3c70a9fafdcd2d7ecb37 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 9 Mar 2014 23:19:50 -0400 >Subject: [PATCH] Bug 11913 - [SIGNED-OFF] Attributes generate error log > during member entry > >In member/memberentry.pl, there were two lines like: > my $newentry = { map { $_ => $entry->{$_} } %$entry }; >These were in the 'sub patron_attributes_form'. > >They have been changed to: > my $newentry = { %$entry }; >Of course, indentation does not reflect actual indentation. > >They were discovered while testing another bug, which required >editing a member record. > >TEST PLAN >--------- >1) Make sure you have the SHOW_BCODE attribute. >2) Go edit a member. >3) Clear the SHOW_BCODE value. >4) Save. >5) Edit again. >6) Check the error log file. >7) apply patch. >8) Change the value for SHOW_BCODE (Yes/No) >9) Save. >10) Edit again. (tests change 1) >11) Clear the SHOW_BCODE >12) Save. >13) Edit again. (tests change 2) >14) Check the error log file. > >Signed-off-by: Magnus Enger <digitalutvikling@gmail.com> >Tested with the SHOW_BCODE attribute, setting it to empty, >Yes and No. The patch removes the error log messages, as >described. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >The existing code is really weird, I did not find any usefulness to have >values in keys. No regression found. >--- > members/memberentry.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 28ab5e0..ff92447 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -781,7 +781,7 @@ sub patron_attributes_form { > }; > if (exists $attr_hash{$attr_type->code()}) { > foreach my $attr (@{ $attr_hash{$attr_type->code()} }) { >- my $newentry = { map { $_ => $entry->{$_} } %$entry }; >+ my $newentry = { %$entry }; > $newentry->{value} = $attr->{value}; > $newentry->{password} = $attr->{password}; > $newentry->{use_dropdown} = 0; >@@ -795,7 +795,7 @@ sub patron_attributes_form { > } > } else { > $i++; >- my $newentry = { map { $_ => $entry->{$_} } %$entry }; >+ my $newentry = { %$entry }; > if ($attr_type->authorised_value_category()) { > $newentry->{use_dropdown} = 1; > $newentry->{auth_val_loop} = GetAuthorisedValues($attr_type->authorised_value_category()); >-- >1.7.10.4
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 11913
:
25970
|
26052
| 26411