Bug 9147: OPAC hidden fields are not hidden in ISBD view

When in framework a subfield has a number > 0 in hidden, it his hidden in MARCview.
It should be hidden also in ISBD view.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Does what it says, hides hidden fields on the OPAC

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

To test:
1) Hide 245$b or another field from ISBD view in your MARC
   framework by assigning a hidden value greater 0
2) Check the different views in OPAC, the field should be hidden now from
  - Labelled MARC view (as it was before this patch)
  - ISBD view
   It will still show up for plain MARC and XSLT views.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Fridolyn SOMERS 2012-11-26 15:15:18 +01:00 committed by Jared Camins-Esakov
parent 54af338d97
commit ec6dd32bde

View file

@ -956,6 +956,10 @@ sub GetISBDView {
# warn "ERROR IN ISBD DEFINITION at : $isbdfield" unless $fieldvalue;
# warn "FV : $fieldvalue";
if ( $subfvalue ne "" ) {
# OPAC hidden subfield
next
if ( ( $template eq 'opac' )
&& ( $tagslib->{$fieldvalue}->{$subfvalue}->{'hidden'} || 0 ) > 0 );
foreach my $field (@fieldslist) {
foreach my $subfield ( $field->subfield($subfvalue) ) {
my $calculated = $analysestring;
@ -991,6 +995,10 @@ sub GetISBDView {
for my $i ( 0 .. $#subf ) {
my $valuecode = $subf[$i][1];
my $subfieldcode = $subf[$i][0];
# OPAC hidden subfield
next
if ( ( $template eq 'opac' )
&& ( $tagslib->{$fieldvalue}->{$subfieldcode}->{'hidden'} || 0 ) > 0 );
my $subfieldvalue = GetAuthorisedValueDesc( $tag, $subf[$i][0], $subf[$i][1], '', $tagslib );
my $tagsubf = $tag . $subfieldcode;