Bugzilla – Attachment 111523 Details for
Bug 26539
Inconsistent case sensitivity around patron attribute code - potential data loss
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26539: Display patron's attributes without case sensitivity
Bug-26539-Display-patrons-attributes-without-case-.patch (text/plain), 1.39 KB, created by
Jonathan Druart
on 2020-10-13 10:40:05 UTC
(
hide
)
Description:
Bug 26539: Display patron's attributes without case sensitivity
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-10-13 10:40:05 UTC
Size:
1.39 KB
patch
obsolete
>From 332cc3e6672d6991b1ab06970f1f2b19244485f8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 13 Oct 2020 12:38:13 +0200 >Subject: [PATCH] Bug 26539: Display patron's attributes without case > sensitivity > >--- > members/memberentry.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index bd1509eb09..9f28425130 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -916,7 +916,7 @@ sub patron_attributes_form { > # map patron's attributes into a more convenient structure > my %attr_hash = (); > foreach my $attr (@$attributes) { >- push @{ $attr_hash{$attr->{code}} }, $attr; >+ push @{ $attr_hash{lc($attr->{code})} }, $attr; > } > > my @attribute_loop = (); >@@ -932,8 +932,8 @@ sub patron_attributes_form { > category_code => $attr_type->category_code(), > mandatory => $attr_type->mandatory(), > }; >- if (exists $attr_hash{$attr_type->code()}) { >- foreach my $attr (@{ $attr_hash{$attr_type->code()} }) { >+ if (exists $attr_hash{lc($attr_type->code)}) { >+ foreach my $attr (@{ $attr_hash{lc($attr_type->code)} }) { > my $newentry = { %$entry }; > $newentry->{value} = $attr->{attribute}; > $newentry->{use_dropdown} = 0; >-- >2.20.1
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 26539
: 111523