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

(-)a/C4/AuthoritiesMarc.pm (-1 / +1 lines)
Lines 1471-1477 sub merge { Link Here
1471
                my $newtag = $tags_new && @$tags_new
1471
                my $newtag = $tags_new && @$tags_new
1472
                  ? _merge_newtag( $tag, $tags_new )
1472
                  ? _merge_newtag( $tag, $tags_new )
1473
                  : $tag;
1473
                  : $tag;
1474
                my $controlled_ind = Koha::Authority->new({ authtypecode => $authtypeto ? $authtypeto->authtypecode : undef })->controlled_indicators({ record => $MARCto, biblio_tag => $newtag }); #FIXME Replace this tric with new when refactoring
1474
                my $controlled_ind = $authto->controlled_indicators({ record => $MARCto, biblio_tag => $newtag });
1475
                my $field_to = MARC::Field->new(
1475
                my $field_to = MARC::Field->new(
1476
                    $newtag,
1476
                    $newtag,
1477
                    $controlled_ind->{ind1} // $field->indicator(1),
1477
                    $controlled_ind->{ind1} // $field->indicator(1),
(-)a/Koha/Authority.pm (-5 / +8 lines)
Lines 99-110 sub controlled_indicators { Link Here
99
            $self->marcxml, 'UTF-8', $flavour );
99
            $self->marcxml, 'UTF-8', $flavour );
100
    }
100
    }
101
101
102
    my $authtype = Koha::Authority::Types->find( $self->authtypecode );
102
    if( !$self->{_report_tag} ) {
103
    return {} if !$authtype;
103
        my $authtype = Koha::Authority::Types->find( $self->authtypecode );
104
        return {} if !$authtype; # very exceptional
105
        $self->{_report_tag} = $authtype->auth_tag_to_report;
106
    }
104
107
105
    return Koha::Authority::ControlledIndicators->new->get({
108
    $self->{_ControlledInds} //= Koha::Authority::ControlledIndicators->new;
109
    return $self->{_ControlledInds}->get({
106
        auth_record => $record,
110
        auth_record => $record,
107
        report_tag  => $authtype->auth_tag_to_report,
111
        report_tag  => $self->{_report_tag},
108
        biblio_tag  => $tag,
112
        biblio_tag  => $tag,
109
        flavour     => $flavour,
113
        flavour     => $flavour,
110
    });
114
    });
111
- 

Return to bug 14769