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

(-)a/C4/AuthoritiesMarc.pm (+1 lines)
Lines 53-58 BEGIN { Link Here
53
      DelAuthority
53
      DelAuthority
54
      GetAuthority
54
      GetAuthority
55
      GetAuthorityXML
55
      GetAuthorityXML
56
      GetAuthorizedHeading
56
57
57
      SearchAuthorities
58
      SearchAuthorities
58
59
(-)a/C4/Breeding.pm (-2 / +2 lines)
Lines 27-33 use C4::Charset qw( MarcToUTF8Record SetUTF8Flag ); Link Here
27
use MARC::File::USMARC;
27
use MARC::File::USMARC;
28
use MARC::Field;
28
use MARC::Field;
29
use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch );
29
use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch );
30
use C4::AuthoritiesMarc qw( GuessAuthTypeCode );
30
use C4::AuthoritiesMarc qw( GuessAuthTypeCode GetAuthorizedHeading );
31
use C4::Languages;
31
use C4::Languages;
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::XSLT::Base;
33
use Koha::XSLT::Base;
Lines 593-599 sub Z3950SearchAuth { Link Here
593
                            $heading_authtype_code = GuessAuthTypeCode($marcrecord);
593
                            $heading_authtype_code = GuessAuthTypeCode($marcrecord);
594
                            next if ( not defined $heading_authtype_code ) ;
594
                            next if ( not defined $heading_authtype_code ) ;
595
595
596
                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
596
                            $heading = GetAuthorizedHeading({ record => $marcrecord });
597
597
598
                            my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading );
598
                            my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading );
599
                            my %row_data;
599
                            my %row_data;
(-)a/C4/ImportBatch.pm (-4 / +3 lines)
Lines 32-38 use C4::Biblio qw( Link Here
32
);
32
);
33
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
33
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
34
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
34
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
35
use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority );
35
use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
36
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
36
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
37
use Koha::Items;
37
use Koha::Items;
38
use Koha::SearchEngine;
38
use Koha::SearchEngine;
Lines 1508-1514 sub GetImportRecordMatches { Link Here
1508
    $sth->execute();
1508
    $sth->execute();
1509
    while (my $row = $sth->fetchrow_hashref) {
1509
    while (my $row = $sth->fetchrow_hashref) {
1510
        if ($row->{'record_type'} eq 'auth') {
1510
        if ($row->{'record_type'} eq 'auth') {
1511
            $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
1511
            $row->{'authorized_heading'} = GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
1512
        }
1512
        }
1513
        next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'});
1513
        next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'});
1514
        push @$results, $row;
1514
        push @$results, $row;
Lines 1675-1681 sub _add_auth_fields { Link Here
1675
    if ($marc_record->field('001')) {
1675
    if ($marc_record->field('001')) {
1676
        $controlnumber = $marc_record->field('001')->data();
1676
        $controlnumber = $marc_record->field('001')->data();
1677
    }
1677
    }
1678
    my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });
1678
    my $authorized_heading = GetAuthorizedHeading({ record => $marc_record });
1679
    my $dbh = C4::Context->dbh;
1679
    my $dbh = C4::Context->dbh;
1680
    my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)");
1680
    my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)");
1681
    $sth->execute($import_record_id, $controlnumber, $authorized_heading);
1681
    $sth->execute($import_record_id, $controlnumber, $authorized_heading);
1682
- 

Return to bug 32279