Lines 674-681
sub LinkBibHeadingsToAuthorities {
Link Here
|
674 |
elsif ( C4::Context->preference('AutoCreateAuthorities') ) { |
674 |
elsif ( C4::Context->preference('AutoCreateAuthorities') ) { |
675 |
if ( _check_valid_auth_link( $current_link, $field ) ) { |
675 |
if ( _check_valid_auth_link( $current_link, $field ) ) { |
676 |
$results{'linked'}->{ $heading->display_form() }++; |
676 |
$results{'linked'}->{ $heading->display_form() }++; |
677 |
} |
677 |
} elsif ( $match_count > 1 ) { |
678 |
elsif ( !$match_count ) { |
678 |
$results{'unlinked'}->{ $heading->display_form() }++; |
|
|
679 |
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; |
680 |
} elsif ( !$match_count ) { |
679 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
681 |
my $authority_type = Koha::Authority::Types->find( $heading->auth_type() ); |
680 |
my $marcrecordauth = MARC::Record->new(); |
682 |
my $marcrecordauth = MARC::Record->new(); |
681 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
683 |
if ( C4::Context->preference('marcflavour') eq 'MARC21' ) { |
Lines 760-765
sub LinkBibHeadingsToAuthorities {
Link Here
|
760 |
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; |
762 |
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; |
761 |
} |
763 |
} |
762 |
} |
764 |
} |
|
|
765 |
elsif ( $match_count > 1 ) { |
766 |
$results{'unlinked'}->{ $heading->display_form() }++; |
767 |
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; |
768 |
} |
763 |
else { |
769 |
else { |
764 |
$results{'unlinked'}->{ $heading->display_form() }++; |
770 |
$results{'unlinked'}->{ $heading->display_form() }++; |
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; |
771 |
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; |
766 |
- |
|
|