Lines 1350-1362
sub SetImportRecordMatches {
Link Here
|
1350 |
|
1350 |
|
1351 |
sub _create_import_record { |
1351 |
sub _create_import_record { |
1352 |
my ($batch_id, $record_sequence, $marc_record, $record_type, $encoding, $z3950random, $marc_type) = @_; |
1352 |
my ($batch_id, $record_sequence, $marc_record, $record_type, $encoding, $z3950random, $marc_type) = @_; |
|
|
1353 |
my $marcxml_old = " "; # placeholder because import_records.marcxml_old is NOT NULL with no DEFAULT set |
1353 |
|
1354 |
|
1354 |
my $dbh = C4::Context->dbh; |
1355 |
my $dbh = C4::Context->dbh; |
1355 |
my $sth = $dbh->prepare("INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, |
1356 |
my $sth = $dbh->prepare("INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, |
1356 |
record_type, encoding, z3950random) |
1357 |
marcxml_old, record_type, encoding, z3950random) |
1357 |
VALUES (?, ?, ?, ?, ?, ?, ?)"); |
1358 |
VALUES (?, ?, ?, ?, ?, ?, ?, ?)"); |
1358 |
$sth->execute($batch_id, $record_sequence, $marc_record->as_usmarc(), $marc_record->as_xml($marc_type), |
1359 |
$sth->execute($batch_id, $record_sequence, $marc_record->as_usmarc(), $marc_record->as_xml($marc_type), |
1359 |
$record_type, $encoding, $z3950random); |
1360 |
$marcxml_old, $record_type, $encoding, $z3950random); |
1360 |
my $import_record_id = $dbh->{'mysql_insertid'}; |
1361 |
my $import_record_id = $dbh->{'mysql_insertid'}; |
1361 |
$sth->finish(); |
1362 |
$sth->finish(); |
1362 |
return $import_record_id; |
1363 |
return $import_record_id; |
Lines 1388-1394
sub _add_auth_fields {
Link Here
|
1388 |
|
1389 |
|
1389 |
sub _add_biblio_fields { |
1390 |
sub _add_biblio_fields { |
1390 |
my ($import_record_id, $marc_record) = @_; |
1391 |
my ($import_record_id, $marc_record) = @_; |
1391 |
|
|
|
1392 |
my ($title, $author, $isbn, $issn) = _parse_biblio_fields($marc_record); |
1392 |
my ($title, $author, $isbn, $issn) = _parse_biblio_fields($marc_record); |
1393 |
my $dbh = C4::Context->dbh; |
1393 |
my $dbh = C4::Context->dbh; |
1394 |
# FIXME no controlnumber, originalsource |
1394 |
# FIXME no controlnumber, originalsource |
Lines 1396-1402
sub _add_biblio_fields {
Link Here
|
1396 |
my $sth = $dbh->prepare("INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)"); |
1396 |
my $sth = $dbh->prepare("INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)"); |
1397 |
$sth->execute($import_record_id, $title, $author, $isbn, $issn); |
1397 |
$sth->execute($import_record_id, $title, $author, $isbn, $issn); |
1398 |
$sth->finish(); |
1398 |
$sth->finish(); |
1399 |
|
|
|
1400 |
} |
1399 |
} |
1401 |
|
1400 |
|
1402 |
sub _update_biblio_fields { |
1401 |
sub _update_biblio_fields { |