From 59939784c2617fe83a78af43da440e7ce43c4123 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 23 Jan 2018 15:59:06 +0100 Subject: [PATCH] Bug 20074: (Follow-up) Remove another remainder of biblio hidden logic Script authorities.pl still contains a module 2 calculation on the hidden attribute, although it is used as a boolean. Since -5 mod 2 == 1, it does no harm, but we better remove it. Test plan: Edit and save an authority. Verify that everything still works as expected. Signed-off-by: Josef Moravec Signed-off-by: Katrin Fischer --- authorities/authorities.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 7ffb010..0340277 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -187,7 +187,7 @@ sub create_input { } $subfield_data{visibility} = "display:none;" - if ( ($tagslib->{$tag}->{$subfield}->{hidden} % 2 == 1) and $value ne '' + if( $tagslib->{$tag}->{$subfield}->{hidden} and $value ne '' or ($value eq '' and !$tagslib->{$tag}->{$subfield}->{mandatory}) ); -- 2.1.4