From 1b25d81dc69a758f900b72fbff0c7fc99bc59fa2 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 Signed-off-by: Jonathan Druart --- authorities/authorities.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 7ffb0109ba..0340277924 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.39.5