From 6104cb3c08d7c789e8c81723e9d27335fefcfe1b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 22 May 2024 09:52:04 +0200 Subject: [PATCH] Bug 35929: Remove extra parenthesis and make it more readable Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer (cherry picked from commit ad41c672a13f8e18ea2fbbc4ad3245165693c339) Signed-off-by: Fridolin Somers (cherry picked from commit ae53cf4eea2fb401bae6fad487b779002aa05789) Signed-off-by: Lucas Gass --- opac/opac-memberentry.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index f3ecf05821..2cdbb36eb9 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -577,9 +577,11 @@ sub DelUnchangedFields { # get the hidden fields so we don't obliterate them should they have data patrons aren't allowed to modify my $hidden_fields = GetHiddenFields($mandatory, 'edit'); - foreach my $key ( keys %new_data ) { - next if ( ($new_data{$key} || $current_data->{$key}) && ( $new_data{$key} ne $current_data->{$key} ) && !($hidden_fields->{$key}) ); + next + if ( $new_data{$key} || $current_data->{$key} ) + && $new_data{$key} ne $current_data->{$key} + && !$hidden_fields->{$key}; delete $new_data{$key}; }