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

(-)a/C4/AuthoritiesMarc.pm (-65 / +20 lines)
Lines 27-32 use C4::AuthoritiesMarc::UNIMARC; Link Here
27
use C4::Charset;
27
use C4::Charset;
28
use C4::Log;
28
use C4::Log;
29
use Koha::MetadataRecord::Authority;
29
use Koha::MetadataRecord::Authority;
30
use Koha::Authorities;
30
use Koha::Authority::Types;
31
use Koha::Authority::Types;
31
32
32
use vars qw($VERSION @ISA @EXPORT);
33
use vars qw($VERSION @ISA @EXPORT);
Lines 39-46 BEGIN { Link Here
39
	@ISA = qw(Exporter);
40
	@ISA = qw(Exporter);
40
	@EXPORT = qw(
41
	@EXPORT = qw(
41
	    &GetTagsLabels
42
	    &GetTagsLabels
42
	    &GetAuthType
43
	    &GetAuthTypeCode
44
    	&GetAuthMARCFromKohaField 
43
    	&GetAuthMARCFromKohaField 
45
44
46
    	&AddAuthority
45
    	&AddAuthority
Lines 300-315 sub SearchAuthorities { Link Here
300
                    $reported_tag .= '$' . $_->[0] . $_->[1];
299
                    $reported_tag .= '$' . $_->[0] . $_->[1];
301
                }
300
                }
302
            }
301
            }
303
            my $thisauthtypecode = GetAuthTypeCode($authid);
302
304
            my $thisauthtype = GetAuthType($thisauthtypecode);
303
            my $thisauthtypecode = Koha::Authorities->find($authid)->authtypecode;
304
            my $thisauthtype = Koha::Authority::Types->find($thisauthtypecode);
305
            unless (defined $thisauthtype) {
305
            unless (defined $thisauthtype) {
306
                $thisauthtypecode = $authtypecode;
306
                $thisauthtypecode = $authtypecode;
307
                $thisauthtype = GetAuthType($authtypecode);
307
                $thisauthtype = Koha::Authority::Types->find($thisauthtypecode);
308
            }
308
            }
309
            my $summary = BuildSummary( $authrecord, $authid, $thisauthtypecode );
309
            my $summary = BuildSummary( $authrecord, $authid, $thisauthtypecode );
310
310
311
            $newline{authtype}     = defined($thisauthtype) ?
311
            $newline{authtype}     = defined($thisauthtype) ?
312
                                        $thisauthtype->{'authtypetext'} : '';
312
                                        $thisauthtype->authtypetext : '';
313
            $newline{summary}      = $summary;
313
            $newline{summary}      = $summary;
314
            $newline{even}         = $counter % 2;
314
            $newline{even}         = $counter % 2;
315
            $newline{reported_tag} = $reported_tag;
315
            $newline{reported_tag} = $reported_tag;
Lines 367-390 sub CountUsageChildren { Link Here
367
  my ($authid) = @_;
367
  my ($authid) = @_;
368
}
368
}
369
369
370
=head2 GetAuthTypeCode
371
372
  $authtypecode= &GetAuthTypeCode($authid)
373
374
returns authtypecode of an authid
375
376
=cut
377
378
sub GetAuthTypeCode {
379
#AUTHfind_authtypecode
380
  my ($authid) = @_;
381
  my $dbh=C4::Context->dbh;
382
  my $sth = $dbh->prepare("select authtypecode from auth_header where authid=?");
383
  $sth->execute($authid);
384
  my $authtypecode = $sth->fetchrow;
385
  return $authtypecode;
386
}
387
 
388
=head2 GuessAuthTypeCode
370
=head2 GuessAuthTypeCode
389
371
390
  my $authtypecode = GuessAuthTypeCode($record);
372
  my $authtypecode = GuessAuthTypeCode($record);
Lines 803-834 sub GetAuthority { Link Here
803
    return ($authority->record);
785
    return ($authority->record);
804
}
786
}
805
787
806
=head2 GetAuthType 
807
808
  $result = &GetAuthType($authtypecode)
809
810
If the authority type specified by C<$authtypecode> exists,
811
returns a hashref of the type's fields.  If the type
812
does not exist, returns undef.
813
814
=cut
815
816
sub GetAuthType {
817
    my ($authtypecode) = @_;
818
    my $dbh=C4::Context->dbh;
819
    my $sth;
820
    if (defined $authtypecode){ # NOTE - in MARC21 framework, '' is a valid authority 
821
                                # type (FIXME but why?)
822
        $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
823
        $sth->execute($authtypecode);
824
        if (my $res = $sth->fetchrow_hashref) {
825
            return $res; 
826
        }
827
    }
828
    return;
829
}
830
831
832
=head2 FindDuplicateAuthority
788
=head2 FindDuplicateAuthority
833
789
834
  $record= &FindDuplicateAuthority( $record, $authtypecode)
790
  $record= &FindDuplicateAuthority( $record, $authtypecode)
Lines 896-911 sub BuildSummary { Link Here
896
    my $summary_template;
852
    my $summary_template;
897
    # handle $authtypecode is NULL or eq ""
853
    # handle $authtypecode is NULL or eq ""
898
    if ($authtypecode) {
854
    if ($authtypecode) {
899
        my $authref = GetAuthType($authtypecode);
855
        my $authref = Koha::Authority::Types->find($authtypecode);
900
        $summary{authtypecode} = $authref->{authtypecode};
856
        $summary{authtypecode} = $authref->authtypecode;
901
        $summary{type} = $authref->{authtypetext};
857
        $summary{type} = $authref->authtypetext;
902
        $summary_template = $authref->{summary};
858
        $summary_template = $authref->summary;
903
        # for MARC21, the authority type summary displays a label meant for
859
        # for MARC21, the authority type summary displays a label meant for
904
        # display
860
        # display
905
        if (C4::Context->preference('marcflavour') ne 'UNIMARC') {
861
        if (C4::Context->preference('marcflavour') ne 'UNIMARC') {
906
            $summary{label} = $authref->{summary};
862
            $summary{label} = $authref->summary;
907
        } else {
863
        } else {
908
            $summary{summary} = $authref->{summary};
864
            $summary{summary} = $authref->summary;
909
        }
865
        }
910
    }
866
    }
911
    my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
867
    my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
Lines 1443-1457 sub merge { Link Here
1443
    my ($mergefrom,$MARCfrom,$mergeto,$MARCto) = @_;
1399
    my ($mergefrom,$MARCfrom,$mergeto,$MARCto) = @_;
1444
    my ($counteditedbiblio,$countunmodifiedbiblio,$counterrors)=(0,0,0);        
1400
    my ($counteditedbiblio,$countunmodifiedbiblio,$counterrors)=(0,0,0);        
1445
    my $dbh=C4::Context->dbh;
1401
    my $dbh=C4::Context->dbh;
1446
    my $authtypecodefrom = GetAuthTypeCode($mergefrom);
1402
    my $authtypefrom = Koha::Authority::Types->find($mergefrom);
1447
    my $authtypecodeto = GetAuthTypeCode($mergeto);
1403
    my $authtypeto   = Koha::Authority::Types->find($mergeto);
1448
#     warn "mergefrom : $authtypecodefrom $mergefrom mergeto : $authtypecodeto $mergeto ";
1404
1449
    # return if authority does not exist
1450
    return "error MARCFROM not a marcrecord ".Data::Dumper::Dumper($MARCfrom) if scalar($MARCfrom->fields()) == 0;
1405
    return "error MARCFROM not a marcrecord ".Data::Dumper::Dumper($MARCfrom) if scalar($MARCfrom->fields()) == 0;
1451
    return "error MARCTO not a marcrecord".Data::Dumper::Dumper($MARCto) if scalar($MARCto->fields()) == 0;
1406
    return "error MARCTO not a marcrecord".Data::Dumper::Dumper($MARCto) if scalar($MARCto->fields()) == 0;
1452
    # search the tag to report
1407
    # search the tag to report
1453
    my $auth_tag_to_report_from = Koha::Authority::Types->find($authtypecodefrom)->auth_tag_to_report;
1408
    my $auth_tag_to_report_from = $authtypefrom->auth_tag_to_report;
1454
    my $auth_tag_to_report_to = Koha::Authority::Types->find($authtypecodeto)->auth_tag_to_report;
1409
    my $auth_tag_to_report_to   = $authtypeto->auth_tag_to_report;
1455
1410
1456
    my @record_to;
1411
    my @record_to;
1457
    @record_to = $MARCto->field($auth_tag_to_report_to)->subfields() if $MARCto->field($auth_tag_to_report_to);
1412
    @record_to = $MARCto->field($auth_tag_to_report_to)->subfields() if $MARCto->field($auth_tag_to_report_to);
Lines 1491-1505 sub merge { Link Here
1491
    # Get All candidate Tags for the change 
1446
    # Get All candidate Tags for the change 
1492
    # (This will reduce the search scope in marc records).
1447
    # (This will reduce the search scope in marc records).
1493
    my $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?");
1448
    my $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?");
1494
    $sth->execute($authtypecodefrom);
1449
    $sth->execute($authtypefrom->authtypecode);
1495
    my @tags_using_authtype;
1450
    my @tags_using_authtype;
1496
    while (my ($tagfield) = $sth->fetchrow) {
1451
    while (my ($tagfield) = $sth->fetchrow) {
1497
        push @tags_using_authtype,$tagfield ;
1452
        push @tags_using_authtype,$tagfield ;
1498
    }
1453
    }
1499
    my $tag_to=0;  
1454
    my $tag_to=0;  
1500
    if ($authtypecodeto ne $authtypecodefrom){  
1455
    if ($authtypeto->authtypecode ne $authtypefrom->authtypecode){
1501
        # If many tags, take the first
1456
        # If many tags, take the first
1502
        $sth->execute($authtypecodeto);    
1457
        $sth->execute($authtypeto->authtypecode);
1503
        $tag_to=$sth->fetchrow;
1458
        $tag_to=$sth->fetchrow;
1504
        #warn $tag_to;    
1459
        #warn $tag_to;    
1505
    }  
1460
    }  
(-)a/C4/Biblio.pm (-3 / +3 lines)
Lines 39-44 use C4::Linker; Link Here
39
use C4::OAI::Sets;
39
use C4::OAI::Sets;
40
40
41
use Koha::Cache;
41
use Koha::Cache;
42
use Koha::Authority::Types;
42
43
43
use vars qw($VERSION @ISA @EXPORT);
44
use vars qw($VERSION @ISA @EXPORT);
44
45
Lines 572-579 sub LinkBibHeadingsToAuthorities { Link Here
572
                    $results{'linked'}->{ $heading->display_form() }++;
573
                    $results{'linked'}->{ $heading->display_form() }++;
573
                }
574
                }
574
                else {
575
                else {
575
                    my $authtypedata =
576
                    my $authority_type = Koha::Authority::Types->find( $heading->auth_type() );
576
                      C4::AuthoritiesMarc::GetAuthType( $heading->auth_type() );
577
                    my $marcrecordauth = MARC::Record->new();
577
                    my $marcrecordauth = MARC::Record->new();
578
                    if ( C4::Context->preference('marcflavour') eq 'MARC21' ) {
578
                    if ( C4::Context->preference('marcflavour') eq 'MARC21' ) {
579
                        $marcrecordauth->leader('     nz  a22     o  4500');
579
                        $marcrecordauth->leader('     nz  a22     o  4500');
Lines 582-588 sub LinkBibHeadingsToAuthorities { Link Here
582
                    $field->delete_subfield( code => '9' )
582
                    $field->delete_subfield( code => '9' )
583
                      if defined $current_link;
583
                      if defined $current_link;
584
                    my $authfield =
584
                    my $authfield =
585
                      MARC::Field->new( $authtypedata->{auth_tag_to_report},
585
                      MARC::Field->new( $authority_type->auth_tag_to_report,
586
                        '', '', "a" => "" . $field->subfield('a') );
586
                        '', '', "a" => "" . $field->subfield('a') );
587
                    map {
587
                    map {
588
                        $authfield->add_subfields( $_->[0] => $_->[1] )
588
                        $authfield->add_subfields( $_->[0] => $_->[1] )
(-)a/Koha/MetadataRecord/Authority.pm (-3 / +3 lines)
Lines 41-47 use Koha::Util::MARC; Link Here
41
41
42
use base qw(Koha::MetadataRecord);
42
use base qw(Koha::MetadataRecord);
43
43
44
__PACKAGE__->mk_accessors(qw( authid authtype ));
44
__PACKAGE__->mk_accessors(qw( authid authtypecode ));
45
45
46
=head2 new
46
=head2 new
47
47
Lines 100-106 sub get_from_authid { Link Here
100
    $authtypecode ||= C4::AuthoritiesMarc::GuessAuthTypeCode($record);
100
    $authtypecode ||= C4::AuthoritiesMarc::GuessAuthTypeCode($record);
101
101
102
    my $self = $class->SUPER::new( { authid => $authid,
102
    my $self = $class->SUPER::new( { authid => $authid,
103
                                     authtype => $authtypecode,
103
                                     authtypecode => $authtypecode,
104
                                     schema => $marcflavour,
104
                                     schema => $marcflavour,
105
                                     record => $record });
105
                                     record => $record });
106
106
Lines 139-145 sub get_from_breeding { Link Here
139
139
140
    my $self = $class->SUPER::new( {
140
    my $self = $class->SUPER::new( {
141
                                     schema => $marcflavour,
141
                                     schema => $marcflavour,
142
                                     authtype => $authtypecode,
142
                                     authtypecode => $authtypecode,
143
                                     record => $record });
143
                                     record => $record });
144
144
145
    bless $self, $class;
145
    bless $self, $class;
(-)a/authorities/authorities.pl (-1 / +1 lines)
Lines 568-574 my $breedingid = $input->param('breedingid'); Link Here
568
568
569
my $dbh = C4::Context->dbh;
569
my $dbh = C4::Context->dbh;
570
if(!$authtypecode) {
570
if(!$authtypecode) {
571
  $authtypecode = $authid? &GetAuthTypeCode($authid): '';
571
    $authtypecode = $authid ? Koha::Authorities->find($authid)->authtypecode : '';
572
}
572
}
573
573
574
my ($template, $loggedinuser, $cookie)
574
my ($template, $loggedinuser, $cookie)
(-)a/authorities/blinddetail-biblio-search.pl (-4 / +7 lines)
Lines 47-52 use CGI qw ( -utf8 ); Link Here
47
use MARC::Record;
47
use MARC::Record;
48
use C4::Koha;
48
use C4::Koha;
49
49
50
use Koha::Authorities;
51
use Koha::Authority::Types;
52
50
my $query = new CGI;
53
my $query = new CGI;
51
54
52
my $dbh = C4::Context->dbh;
55
my $dbh = C4::Context->dbh;
Lines 55-64 my $authid = $query->param('authid'); Link Here
55
my $index        = $query->param('index');
58
my $index        = $query->param('index');
56
my $tagid        = $query->param('tagid');
59
my $tagid        = $query->param('tagid');
57
my $relationship = $query->param('relationship');
60
my $relationship = $query->param('relationship');
58
my $authtypecode = &GetAuthTypeCode($authid);
61
my $authtypecode = Koha::Authorities->find($authid)->authtypecode;
59
my $tagslib      = &GetTagsLabels( 1, $authtypecode );
62
my $tagslib      = &GetTagsLabels( 1, $authtypecode );
60
63
61
my $auth_type = GetAuthType($authtypecode);
64
my $auth_type = Koha::Authority::Types->find($authtypecode);
62
my $record;
65
my $record;
63
if ($authid) {
66
if ($authid) {
64
    $record = GetAuthority($authid);
67
    $record = GetAuthority($authid);
Lines 79-85 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
79
my @subfield_loop;
82
my @subfield_loop;
80
my ($indicator1, $indicator2);
83
my ($indicator1, $indicator2);
81
if ($authid) {
84
if ($authid) {
82
    my @fields = $record->field( $auth_type->{auth_tag_to_report} );
85
    my @fields = $record->field( $auth_type->auth_tag_to_report );
83
    my $repet = ($query->param('repet') || 1) - 1;
86
    my $repet = ($query->param('repet') || 1) - 1;
84
    my $field = $fields[$repet];
87
    my $field = $fields[$repet];
85
88
Lines 104-110 if ($authid) { Link Here
104
        $indicator1 = $field->indicator('1');
107
        $indicator1 = $field->indicator('1');
105
        $indicator2 = $field->indicator('2');
108
        $indicator2 = $field->indicator('2');
106
    } elsif (C4::Context->preference('marcflavour') eq 'MARC21') {
109
    } elsif (C4::Context->preference('marcflavour') eq 'MARC21') {
107
        my $tag_from = $auth_type->{auth_tag_to_report};
110
        my $tag_from = $auth_type->auth_tag_to_report;
108
        my $tag_to = $index;
111
        my $tag_to = $index;
109
        $tag_to =~ s/^tag_(\d*)_.*$/$1/;
112
        $tag_to =~ s/^tag_(\d*)_.*$/$1/;
110
        if ($tag_to =~ /^6/) {  # subject heading
113
        if ($tag_to =~ /^6/) {  # subject heading
(-)a/authorities/detail-biblio-search.pl (-1 / +2 lines)
Lines 50-55 use C4::Koha; Link Here
50
# use C4::Biblio;
50
# use C4::Biblio;
51
# use C4::Catalogue;
51
# use C4::Catalogue;
52
52
53
use Koha::Authorities;
53
use Koha::Authority::Types;
54
use Koha::Authority::Types;
54
55
55
my $query=new CGI;
56
my $query=new CGI;
Lines 58-64 my $dbh=C4::Context->dbh; Link Here
58
59
59
my $authid = $query->param('authid');
60
my $authid = $query->param('authid');
60
my $index = $query->param('index');
61
my $index = $query->param('index');
61
my $authtypecode = &GetAuthTypeCode($authid);
62
my $authtypecode = Koha::Authorities->find($authid)->authtypecode;
62
my $tagslib = &GetTagsLabels(1,$authtypecode);
63
my $tagslib = &GetTagsLabels(1,$authtypecode);
63
64
64
my $record =GetAuthority($authid);
65
my $record =GetAuthority($authid);
(-)a/authorities/detail.pl (-1 / +2 lines)
Lines 47-52 use C4::Output; Link Here
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use MARC::Record;
48
use MARC::Record;
49
use C4::Koha;
49
use C4::Koha;
50
use Koha::Authorities;
50
51
51
use Koha::Authority::Types;
52
use Koha::Authority::Types;
52
53
Lines 176-182 my ($template, $loggedinuser, $cookie) = get_template_and_user( Link Here
176
177
177
my $authid = $query->param('authid');
178
my $authid = $query->param('authid');
178
179
179
my $authtypecode = GetAuthTypeCode($authid);
180
my $authtypecode = Koha::Authorities->find($authid)->authtypecode;
180
$tagslib = &GetTagsLabels(1,$authtypecode);
181
$tagslib = &GetTagsLabels(1,$authtypecode);
181
182
182
# Build list of authtypes for showing them
183
# Build list of authtypes for showing them
(-)a/authorities/merge.pl (-7 / +7 lines)
Lines 104-115 else { Link Here
104
        if ($mergereference) {
104
        if ($mergereference) {
105
105
106
            my $framework;
106
            my $framework;
107
            if ( $recordObj1->authtype ne $recordObj2->authtype && $mergereference ne 'breeding' ) {
107
            if ( $recordObj1->authtypecode ne $recordObj2->authtypecode && $mergereference ne 'breeding' ) {
108
                $framework = $input->param('frameworkcode')
108
                $framework = $input->param('frameworkcode')
109
                  or push @errors, { code => 'FRAMEWORK_NOT_SELECTED' };
109
                  or push @errors, { code => 'FRAMEWORK_NOT_SELECTED' };
110
            }
110
            }
111
            else {
111
            else {
112
                $framework = $recordObj1->authtype;
112
                $framework = $recordObj1->authtypecode;
113
            }
113
            }
114
            if ($mergereference eq 'breeding') {
114
            if ($mergereference eq 'breeding') {
115
                $mergereference = $authid[0];
115
                $mergereference = $authid[0];
Lines 155-161 else { Link Here
155
                title1          => $recordObj1->authorized_heading,
155
                title1          => $recordObj1->authorized_heading,
156
                title2          => $recordObj2->authorized_heading,
156
                title2          => $recordObj2->authorized_heading,
157
            );
157
            );
158
            if ( $recordObj1->authtype ne $recordObj2->authtype ) {
158
            if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) {
159
                my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypecode'] } );
159
                my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypecode'] } );
160
                my @frameworkselect;
160
                my @frameworkselect;
161
                while ( my $authority_type = $authority_types->next ) {
161
                while ( my $authority_type = $authority_types->next ) {
Lines 167-176 else { Link Here
167
                }
167
                }
168
                $template->param(
168
                $template->param(
169
                    frameworkselect => \@frameworkselect,
169
                    frameworkselect => \@frameworkselect,
170
                    frameworkcode1  => $recordObj1->authtype,
170
                    frameworkcode1  => $recordObj1->authtypecode,
171
                    frameworkcode2  => $recordObj2->authtype,
171
                    frameworkcode2  => $recordObj2->authtypecode,
172
                    frameworklabel1 => $frameworks->{$recordObj1->authtype}->{'authtypetext'},
172
                    frameworklabel1 => $recordObj1->authtypetext,
173
                    frameworklabel2 => $frameworks->{$recordObj2->authtype}->{'authtypetext'},
173
                    frameworklabel2 => $recordObj2->authtypetext,
174
                );
174
                );
175
            }
175
            }
176
        }
176
        }
(-)a/misc/migration_tools/merge_authority.pl (-2 / +2 lines)
Lines 55-62 $|=1; # flushes output Link Here
55
my $authfrom = GetAuthority($mergefrom);
55
my $authfrom = GetAuthority($mergefrom);
56
my $authto = GetAuthority($mergeto);
56
my $authto = GetAuthority($mergeto);
57
57
58
my $authtypecodefrom = GetAuthTypeCode($mergefrom);
58
my $authtypecodefrom = $mergefrom->authtypecode;
59
my $authtypecodeto = GetAuthTypeCode($mergeto);
59
my $authtypecodeto   = $mergeto->authtypecode;
60
60
61
unless ($noconfirm || $batch) {
61
unless ($noconfirm || $batch) {
62
    print "************\n";
62
    print "************\n";
(-)a/opac/opac-authoritiesdetail.pl (-1 / +1 lines)
Lines 75-81 if ( ! $record ) { Link Here
75
    exit;
75
    exit;
76
}
76
}
77
77
78
my $authtypecode = &GetAuthTypeCode( $authid );
78
my $authtypecode = $record->authtypecode;
79
79
80
if ($display_hierarchy){
80
if ($display_hierarchy){
81
    $template->{VARS}->{'displayhierarchy'} = $display_hierarchy;
81
    $template->{VARS}->{'displayhierarchy'} = $display_hierarchy;
(-)a/tools/batch_record_modification.pl (-3 / +2 lines)
Lines 25-31 use List::MoreUtils qw( uniq ); Link Here
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::AuthoritiesMarc qw( BuildSummary GetAuthTypeCode ModAuthority );
28
use C4::AuthoritiesMarc qw( BuildSummary ModAuthority );
29
use C4::BackgroundJob;
29
use C4::BackgroundJob;
30
use C4::Biblio qw( GetMarcBiblio ModBiblio );
30
use C4::Biblio qw( GetMarcBiblio ModBiblio );
31
use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates ModifyRecordWithTemplate );
31
use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates ModifyRecordWithTemplate );
Lines 216-222 if ( $op eq 'form' ) { Link Here
216
                my $authority = Koha::MetadataRecord::Authority->get_from_authid( $authid );
216
                my $authority = Koha::MetadataRecord::Authority->get_from_authid( $authid );
217
                my $record = $authority->record;
217
                my $record = $authority->record;
218
                ModifyRecordWithTemplate( $mmtid, $record );
218
                ModifyRecordWithTemplate( $mmtid, $record );
219
                ModAuthority( $authid, $record, GetAuthTypeCode( $authid ) );
219
                ModAuthority( $authid, $record, $authority->authtypecode );
220
            };
220
            };
221
            if ( $error and $error != $authid or $@ ) {
221
            if ( $error and $error != $authid or $@ ) {
222
                push @messages, {
222
                push @messages, {
223
- 

Return to bug 15381