Bug 20074: (follow-up) Remove another remainder of biblio hidden logic
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 23 Jan 2018 14:59:06 +0000 (15:59 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Feb 2018 16:04:27 +0000 (13:04 -0300)
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 <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

authorities/authorities.pl

index 7ffb010..0340277 100755 (executable)
@@ -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})
         );