Bug 6829 Follow up patch
authorFrédéric Demians <f.demians@tamil.fr>
Tue, 27 Dec 2011 10:01:48 +0000 (11:01 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 23 Jan 2012 17:07:58 +0000 (18:07 +0100)
To reproduce the bug:

- Open OPAC MARC View for a specific biblio record
- Fields which are affected to tab 0 are all hidden

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes bug for 0xx fields in OPAC MARC view.
Note: the problem only exists for 0xx fields with real subfields,
control fields display correctly, fields like 040 only display
after patch was applied.

opac/opac-MARCdetail.pl

index ffa0a6d..272ac0c 100755 (executable)
@@ -142,7 +142,7 @@ for ( my $tabloop = 0 ; $tabloop <= 10 ; $tabloop++ ) {
             for my $i ( 0 .. $#subf ) {
                 $subf[$i][0] = "@" unless $subf[$i][0];
                 my $sf_def = $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] };
-                next if ( ($sf_def->{tab}||'') ne $tabloop );
+                next if ( ($sf_def->{tab}||0) != $tabloop );
                 next if ( ($sf_def->{hidden}||0) > 0 );
                 my %subfield_data;
                 $subfield_data{marc_lib} = ($sf_def->{lib} eq $previous) ?  '--' : $sf_def->{lib};