build_authorized_values_list( $tag, $subfield, $value, $dbh,
$authorised_values_sth,$index_tag,$index_subfield );
+ # it's a subfield $9 linking to an authority record - see bug 2206
+ }
+ elsif ($subfield eq "9" and
+ exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
+ defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
+ $tagslib->{$tag}->{'a'}->{authtypecode} ne '') {
+
+ $subfield_data{marc_value} =
+ "<input type=\"text\"
+ id=\"".$subfield_data{id}."\"
+ name=\"".$subfield_data{id}."\"
+ value=\"$value\"
+ class=\"input_marceditor\"
+ tabindex=\"1\"
+ size=\"5\"
+ maxlength=\"255\"
+ readonly=\"readonly\"
+ \/>";
+
# it's a thesaurus / authority field
}
elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) {
next if ( $tag < 10 );
next
if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
- or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 )
- ); #check for visibility flag
+ or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
+ and not ( $subfield eq "9" and
+ exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
+ defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
+ $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
+ )
+ ; #check for visibility flag
+ # if subfield is $9 in a field whose $a is authority-controlled,
+ # always include in the form regardless of the hidden setting - bug 2206
next if ( defined( $field->subfield($subfield) ) );
push(
@subfields_data,
next
if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -5 )
or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 4 ) )
+ and not ( $subfield eq "9" and
+ exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
+ defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
+ $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
+ )
; #check for visibility flag
+ # if subfield is $9 in a field whose $a is authority-controlled,
+ # always include in the form regardless of the hidden setting - bug 2206
next
if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
push(
###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode
###NOTICE : This can be a problem. We should also look into other types and rejected forms.
my $authtypedata=GetAuthType($data->{authtypecode});
+ next unless $authtypedata;
my $marcrecordauth=MARC::Record->new();
my $authfield=MARC::Field->new($authtypedata->{auth_tag_to_report},'','',"a"=>"".$field->subfield('a'));
map { $authfield->add_subfields($_->[0]=>$_->[1]) if ($_->[0]=~/[A-z]/ && $_->[0] ne "a" )} $field->subfields();