From c21cac493d5c3604692fad43e700203188b3645e Mon Sep 17 00:00:00 2001 From: kados Date: Wed, 15 Mar 2006 06:17:08 +0000 Subject: [PATCH] refining visibility scheme further -- I don't think the leader would ever be hidden from the Intranet --- MARCdetail.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/MARCdetail.pl b/MARCdetail.pl index 141fd2ff86..a4872a1cc6 100755 --- a/MARCdetail.pl +++ b/MARCdetail.pl @@ -118,7 +118,7 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { my @loop_data =(); my @subfields_data; # deal with leader - unless ($tagslib->{'000'}->{'@'}->{tab} ne $tabloop or ($tagslib->{'000'}->{'@'}->{hidden}==(-7|-4|-3|-2|2|3|5|8))) { + unless ($tagslib->{'000'}->{'@'}->{tab} ne $tabloop) { # or ($tagslib->{'000'}->{'@'}->{hidden}==(-7|-4|-3|-2|2|3|5|8))) { my %subfield_data; $subfield_data{marc_lib}=$tagslib->{'000'}->{'@'}->{lib}; $subfield_data{marc_value}=$record->leader(); @@ -137,7 +137,7 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { # if tag <10, there's no subfield, use the "@" trick if ($fields[$x_i]->tag()<10) { next if ($tagslib->{$fields[$x_i]->tag()}->{'@'}->{tab} ne $tabloop); - next if ($tagslib->{$fields[$x_i]->tag()}->{'@'}->{hidden}==(-7|-4|-3|-2|2|3|5|8)); + #next if ($tagslib->{$fields[$x_i]->tag()}->{'@'}->{hidden}==(-7|-4|-3|-2|2|3|5|8)); my %subfield_data; $subfield_data{marc_lib}=$tagslib->{$fields[$x_i]->tag()}->{'@'}->{lib}; $subfield_data{marc_value}=$fields[$x_i]->data(); @@ -150,7 +150,15 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { for my $i (0..$#subf) { $subf[$i][0] = "@" unless $subf[$i][0] or $subf[$i][0] eq '0'; next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{tab} ne $tabloop); - next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==(-7|-4|-3|-2|2|3|5|8)); + # implement visibility flags -- see help file in marc_authorities_structure + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==-7); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==-4); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==-3); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==-2); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==2); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==3); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==5); + next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}==8); my %subfield_data; $subfield_data{marc_lib}=$tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{lib}; $subfield_data{link}=$tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{link}; -- 2.39.5