Lines 542-547
sub LinkBibHeadingsToAuthorities {
Link Here
|
542 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => $authid, status => $status || 'LOCAL_FOUND'}) if $verbose; |
542 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => $authid, status => $status || 'LOCAL_FOUND'}) if $verbose; |
543 |
} |
543 |
} |
544 |
else { |
544 |
else { |
|
|
545 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
545 |
if ( defined $current_link |
546 |
if ( defined $current_link |
546 |
&& (!$allowrelink || C4::Context->preference('LinkerKeepStale')) ) |
547 |
&& (!$allowrelink || C4::Context->preference('LinkerKeepStale')) ) |
547 |
{ |
548 |
{ |
Lines 553-559
sub LinkBibHeadingsToAuthorities {
Link Here
|
553 |
$results{'linked'}->{ $heading->display_form() }++; |
554 |
$results{'linked'}->{ $heading->display_form() }++; |
554 |
} |
555 |
} |
555 |
else { |
556 |
else { |
556 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
|
|
557 |
my $marcrecordauth = MARC::Record->new(); |
557 |
my $marcrecordauth = MARC::Record->new(); |
558 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
558 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
559 |
$marcrecordauth->leader(' nz a22 o 4500'); |
559 |
$marcrecordauth->leader(' nz a22 o 4500'); |
Lines 618-629
sub LinkBibHeadingsToAuthorities {
Link Here
|
618 |
$field->delete_subfield( code => '9' ); |
618 |
$field->delete_subfield( code => '9' ); |
619 |
$num_headings_changed++; |
619 |
$num_headings_changed++; |
620 |
$results{'unlinked'}->{ $heading->display_form() }++; |
620 |
$results{'unlinked'}->{ $heading->display_form() }++; |
621 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type()}) if $verbose; |
621 |
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; |
622 |
} |
622 |
} |
623 |
} |
623 |
} |
624 |
else { |
624 |
else { |
625 |
$results{'unlinked'}->{ $heading->display_form() }++; |
625 |
$results{'unlinked'}->{ $heading->display_form() }++; |
626 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type()}) if $verbose; |
626 |
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; |
627 |
} |
627 |
} |
628 |
} |
628 |
} |
629 |
|
629 |
|