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 1480-1486
sub GetImportRecordMatches {
Link Here
|
1480 |
$sth->execute(); |
1480 |
$sth->execute(); |
1481 |
while (my $row = $sth->fetchrow_hashref) { |
1481 |
while (my $row = $sth->fetchrow_hashref) { |
1482 |
if ($row->{'record_type'} eq 'auth') { |
1482 |
if ($row->{'record_type'} eq 'auth') { |
1483 |
$row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } ); |
1483 |
$row->{'authorized_heading'} = GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } ); |
1484 |
} |
1484 |
} |
1485 |
next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'}); |
1485 |
next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'}); |
1486 |
push @$results, $row; |
1486 |
push @$results, $row; |
Lines 1647-1653
sub _add_auth_fields {
Link Here
|
1647 |
if ($marc_record->field('001')) { |
1647 |
if ($marc_record->field('001')) { |
1648 |
$controlnumber = $marc_record->field('001')->data(); |
1648 |
$controlnumber = $marc_record->field('001')->data(); |
1649 |
} |
1649 |
} |
1650 |
my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record }); |
1650 |
my $authorized_heading = GetAuthorizedHeading({ record => $marc_record }); |
1651 |
my $dbh = C4::Context->dbh; |
1651 |
my $dbh = C4::Context->dbh; |
1652 |
my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)"); |
1652 |
my $sth = $dbh->prepare("INSERT INTO import_auths (import_record_id, control_number, authorized_heading) VALUES (?, ?, ?)"); |
1653 |
$sth->execute($import_record_id, $controlnumber, $authorized_heading); |
1653 |
$sth->execute($import_record_id, $controlnumber, $authorized_heading); |
1654 |
- |
|
|