View | Details | Raw Unified | Return to bug 25189
Collapse All | Expand All

(-)a/C4/Biblio.pm (-2 / +2 lines)
Lines 506-512 sub LinkBibHeadingsToAuthorities { Link Here
506
            next;
506
            next;
507
        }
507
        }
508
508
509
        my ( $authid, $fuzzy ) = $linker->get_link($heading);
509
        my ( $authid, $fuzzy, $match_count ) = $linker->get_link($heading);
510
        if ($authid) {
510
        if ($authid) {
511
            $results{ $fuzzy ? 'fuzzy' : 'linked' }
511
            $results{ $fuzzy ? 'fuzzy' : 'linked' }
512
              ->{ $heading->display_form() }++;
512
              ->{ $heading->display_form() }++;
Lines 526-532 sub LinkBibHeadingsToAuthorities { Link Here
526
                if ( _check_valid_auth_link( $current_link, $field ) ) {
526
                if ( _check_valid_auth_link( $current_link, $field ) ) {
527
                    $results{'linked'}->{ $heading->display_form() }++;
527
                    $results{'linked'}->{ $heading->display_form() }++;
528
                }
528
                }
529
                else {
529
                elsif ( !$match_count ) {
530
                    my $authority_type = Koha::Authority::Types->find( $heading->auth_type() );
530
                    my $authority_type = Koha::Authority::Types->find( $heading->auth_type() );
531
                    my $marcrecordauth = MARC::Record->new();
531
                    my $marcrecordauth = MARC::Record->new();
532
                    if ( C4::Context->preference('marcflavour') eq 'MARC21' ) {
532
                    if ( C4::Context->preference('marcflavour') eq 'MARC21' ) {
(-)a/C4/Linker/Default.pm (-2 / +3 lines)
Lines 33-38 sub get_link { Link Here
33
    my $auth_type = $heading->auth_type();
33
    my $auth_type = $heading->auth_type();
34
    my $authid;
34
    my $authid;
35
    my $fuzzy = 0;
35
    my $fuzzy = 0;
36
    my $match_count;
36
37
37
    if ( $self->{'cache'}->{$search_form.$auth_type}->{'cached'} ) {
38
    if ( $self->{'cache'}->{$search_form.$auth_type}->{'cached'} ) {
38
        $authid = $self->{'cache'}->{$search_form.$auth_type}->{'authid'};
39
        $authid = $self->{'cache'}->{$search_form.$auth_type}->{'authid'};
Lines 42-47 sub get_link { Link Here
42
43
43
        # look for matching authorities
44
        # look for matching authorities
44
        my $authorities = $heading->authorities(1);    # $skipmetadata = true
45
        my $authorities = $heading->authorities(1);    # $skipmetadata = true
46
        $match_count = scalar @$authorities;
45
47
46
        if ( $behavior eq 'default' && $#{$authorities} == 0 ) {
48
        if ( $behavior eq 'default' && $#{$authorities} == 0 ) {
47
            $authid = $authorities->[0]->{'authid'};
49
            $authid = $authorities->[0]->{'authid'};
Lines 77-83 sub get_link { Link Here
77
        $self->{'cache'}->{$search_form.$auth_type}->{'authid'} = $authid;
79
        $self->{'cache'}->{$search_form.$auth_type}->{'authid'} = $authid;
78
        $self->{'cache'}->{$search_form.$auth_type}->{'fuzzy'}  = $fuzzy;
80
        $self->{'cache'}->{$search_form.$auth_type}->{'fuzzy'}  = $fuzzy;
79
    }
81
    }
80
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy;
82
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy, $match_count;
81
}
83
}
82
84
83
sub update_cache {
85
sub update_cache {
84
- 

Return to bug 25189