Lines 538-543
sub LinkBibHeadingsToAuthorities {
Link Here
|
538 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => $authid, status => $status || 'LOCAL_FOUND'}) if $verbose; |
538 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => $authid, status => $status || 'LOCAL_FOUND'}) if $verbose; |
539 |
} |
539 |
} |
540 |
else { |
540 |
else { |
|
|
541 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
541 |
if ( defined $current_link |
542 |
if ( defined $current_link |
542 |
&& (!$allowrelink || C4::Context->preference('LinkerKeepStale')) ) |
543 |
&& (!$allowrelink || C4::Context->preference('LinkerKeepStale')) ) |
543 |
{ |
544 |
{ |
Lines 549-555
sub LinkBibHeadingsToAuthorities {
Link Here
|
549 |
$results{'linked'}->{ $heading->display_form() }++; |
550 |
$results{'linked'}->{ $heading->display_form() }++; |
550 |
} |
551 |
} |
551 |
else { |
552 |
else { |
552 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
|
|
553 |
my $marcrecordauth = MARC::Record->new(); |
553 |
my $marcrecordauth = MARC::Record->new(); |
554 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
554 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
555 |
$marcrecordauth->leader(' nz a22 o 4500'); |
555 |
$marcrecordauth->leader(' nz a22 o 4500'); |
Lines 619-630
sub LinkBibHeadingsToAuthorities {
Link Here
|
619 |
$field->delete_subfield( code => '9' ); |
619 |
$field->delete_subfield( code => '9' ); |
620 |
$num_headings_changed++; |
620 |
$num_headings_changed++; |
621 |
$results{'unlinked'}->{ $heading->display_form() }++; |
621 |
$results{'unlinked'}->{ $heading->display_form() }++; |
622 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type()}) if $verbose; |
622 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type(), tag_to_report => $authority_type->auth_tag_to_report}) if $verbose; |
623 |
} |
623 |
} |
624 |
} |
624 |
} |
625 |
else { |
625 |
else { |
626 |
$results{'unlinked'}->{ $heading->display_form() }++; |
626 |
$results{'unlinked'}->{ $heading->display_form() }++; |
627 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type()}) if $verbose; |
627 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type(), tag_to_report => $authority_type->auth_tag_to_report}) if $verbose; |
628 |
} |
628 |
} |
629 |
} |
629 |
} |
630 |
|
630 |
|