Bugzilla – Attachment 62420 Details for
Bug 18339
Koha::Patron::Attribute ->opac_editable and ->opac_display should be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18339: (followup) Remove warnings on adding a patron modification
Bug-18339-followup-Remove-warnings-on-adding-a-pat.patch (text/plain), 1.50 KB, created by
Marc Véron
on 2017-04-19 19:48:31 UTC
(
hide
)
Description:
Bug 18339: (followup) Remove warnings on adding a patron modification
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-04-19 19:48:31 UTC
Size:
1.50 KB
patch
obsolete
>From c766c00139b998a95f02826aa27bb88d63406b0e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 19 Apr 2017 14:44:13 -0300 >Subject: [PATCH] Bug 18339: (followup) Remove warnings on adding a patron > modification >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch removes warnings raised because hash values existence is not >checked before comparing them. > >As the sub is deleting fields that are similar from the modification, I considered >the following use cases >- Both fields are defined, need to compare values, should delete if they match >- One of the fields is defined, the other isn't, discrepancy, should not delete. >- Both fields are not defined, they match, should delete. > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > opac/opac-memberentry.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 5f4cb4d..2f302b5 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -452,8 +452,11 @@ sub DelUnchangedFields { > my $current_data = GetMember( borrowernumber => $borrowernumber ); > > foreach my $key ( keys %new_data ) { >- if ( $current_data->{$key} eq $new_data{$key} ) { >- delete $new_data{$key}; >+ if ( defined $new_data{ $key } && >+ defined $current_data->{$key} && >+ $current_data->{$key} eq $new_data{$key} ) { >+ >+ delete $new_data{ $key }; > } > } > >-- >2.1.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 18339
:
61645
|
62403
|
62405
|
62419
|
62420
|
62628
|
62629
|
62662
|
62663