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