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

(-)a/C4/Biblio.pm (+1 lines)
Lines 634-639 sub LinkBibHeadingsToAuthorities { Link Here
634
                        $heading->auth_type() );
634
                        $heading->auth_type() );
635
                    $field->add_subfields( '9', $authid );
635
                    $field->add_subfields( '9', $authid );
636
                    $num_headings_changed++;
636
                    $num_headings_changed++;
637
                    $linker->update_cache($heading, $authid);
637
                    $results{'added'}->{ $heading->display_form() }++;
638
                    $results{'added'}->{ $heading->display_form() }++;
638
                }
639
                }
639
            }
640
            }
(-)a/C4/Linker.pm (+3 lines)
Lines 35-40 the match is "fuzzy" (the semantics of "fuzzy" are up to the individual plugin). Link Here
35
In order to handle authority limits, get_link should always end with:
35
In order to handle authority limits, get_link should always end with:
36
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy;
36
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy;
37
37
38
B<update_cache ($heading, $authid)> - updates internal linker cache for 
39
$heading with $authid of a new created authotiry record
40
38
B<flip_heading ($field)> - return a MARC::Field object with the heading flipped
41
B<flip_heading ($field)> - return a MARC::Field object with the heading flipped
39
to the preferred form.
42
to the preferred form.
40
43
(-)a/C4/Linker/Default.pm (+12 lines)
Lines 79-84 sub get_link { Link Here
79
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy;
79
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy;
80
}
80
}
81
81
82
sub update_cache {
83
    my $self        = shift;
84
    my $heading     = shift;
85
    my $authid      = shift;
86
    my $search_form = $heading->search_form();
87
    my $fuzzy = 0;
88
89
    $self->{'cache'}->{$search_form}->{'cached'} = 1;
90
    $self->{'cache'}->{$search_form}->{'authid'} = $authid;
91
    $self->{'cache'}->{$search_form}->{'fuzzy'}  = $fuzzy;
92
}
93
82
sub flip_heading {
94
sub flip_heading {
83
    my $self    = shift;
95
    my $self    = shift;
84
    my $heading = shift;
96
    my $heading = shift;
(-)a/C4/Linker/FirstMatch.pm (+7 lines)
Lines 41-46 sub get_link { Link Here
41
    return $self->{'default_linker'}->get_link( $heading, 'first' );
41
    return $self->{'default_linker'}->get_link( $heading, 'first' );
42
}
42
}
43
43
44
sub update_cache {
45
    my $self        = shift;
46
    my $heading     = shift;
47
    my $authid      = shift;
48
    $self->{'default_linker'}->update_cache( $heading, $authid );
49
}
50
44
sub flip_heading {
51
sub flip_heading {
45
    my $self    = shift;
52
    my $self    = shift;
46
    my $heading = shift;
53
    my $heading = shift;
(-)a/C4/Linker/LastMatch.pm (-1 / +7 lines)
Lines 41-46 sub get_link { Link Here
41
    return $self->{'default_linker'}->get_link( $heading, 'last' );
41
    return $self->{'default_linker'}->get_link( $heading, 'last' );
42
}
42
}
43
43
44
sub update_cache {
45
    my $self        = shift;
46
    my $heading     = shift;
47
    my $authid      = shift;    
48
    $self->{'default_linker'}->update_cache( $heading, $authid );
49
}
50
44
sub flip_heading {
51
sub flip_heading {
45
    my $self    = shift;
52
    my $self    = shift;
46
    my $heading = shift;
53
    my $heading = shift;
47
- 

Return to bug 11650