Lines 677-684
sub LinkBibHeadingsToAuthorities {
Link Here
|
677 |
elsif ( C4::Context->preference('AutoCreateAuthorities') ) { |
677 |
elsif ( C4::Context->preference('AutoCreateAuthorities') ) { |
678 |
if ( _check_valid_auth_link( $current_link, $field ) ) { |
678 |
if ( _check_valid_auth_link( $current_link, $field ) ) { |
679 |
$results{'linked'}->{ $heading->display_form() }++; |
679 |
$results{'linked'}->{ $heading->display_form() }++; |
680 |
} |
680 |
} elsif ( $match_count > 1 ) { |
681 |
elsif ( !$match_count ) { |
681 |
$results{'unlinked'}->{ $heading->display_form() }++; |
|
|
682 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'MULTIPLE_MATCH', auth_type => $heading->auth_type(), tag_to_report => $authority_type->auth_tag_to_report}) if $verbose; |
683 |
} elsif ( !$match_count ) { |
682 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
684 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
683 |
my $marcrecordauth = MARC::Record->new(); |
685 |
my $marcrecordauth = MARC::Record->new(); |
684 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
686 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
Lines 763-768
sub LinkBibHeadingsToAuthorities {
Link Here
|
763 |
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; |
765 |
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; |
764 |
} |
766 |
} |
765 |
} |
767 |
} |
|
|
768 |
elsif ( $match_count > 1 ) { |
769 |
$results{'unlinked'}->{ $heading->display_form() }++; |
770 |
push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'MULTIPLE_MATCH', auth_type => $heading->auth_type(), tag_to_report => $authority_type->auth_tag_to_report}) if $verbose; |
771 |
} |
766 |
else { |
772 |
else { |
767 |
$results{'unlinked'}->{ $heading->display_form() }++; |
773 |
$results{'unlinked'}->{ $heading->display_form() }++; |
768 |
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; |
774 |
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; |
769 |
- |
|
|