Lines 591-596
sub BatchCommitRecords {
Link Here
|
591 |
WHERE import_batch_id = ?"); |
591 |
WHERE import_batch_id = ?"); |
592 |
$sth->execute($batch_id); |
592 |
$sth->execute($batch_id); |
593 |
my $marcflavour = C4::Context->preference('marcflavour'); |
593 |
my $marcflavour = C4::Context->preference('marcflavour'); |
|
|
594 |
|
595 |
my $userenv = C4::Context->userenv; |
596 |
my $logged_in_patron = Koha::Patrons->find( $userenv->{number} ); |
597 |
|
594 |
my $rec_num = 0; |
598 |
my $rec_num = 0; |
595 |
while (my $rowref = $sth->fetchrow_hashref) { |
599 |
while (my $rowref = $sth->fetchrow_hashref) { |
596 |
$record_type = $rowref->{'record_type'}; |
600 |
$record_type = $rowref->{'record_type'}; |
Lines 664-670
sub BatchCommitRecords {
Link Here
|
664 |
} |
668 |
} |
665 |
$oldxml = $old_marc->as_xml($marc_type); |
669 |
$oldxml = $old_marc->as_xml($marc_type); |
666 |
|
670 |
|
667 |
ModBiblio($marc_record, $recordid, $oldbiblio->frameworkcode, {context => {source => 'batchimport'}}); |
671 |
ModBiblio($marc_record, $recordid, $oldbiblio->frameworkcode, { |
|
|
672 |
context => { |
673 |
source => 'batchimport', |
674 |
categorycode => $logged_in_patron->categorycode, |
675 |
userid => $logged_in_patron->userid |
676 |
}, |
677 |
}); |
668 |
$query = "UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?"; # FIXME call SetMatchedBiblionumber instead |
678 |
$query = "UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?"; # FIXME call SetMatchedBiblionumber instead |
669 |
|
679 |
|
670 |
if ($item_result eq 'create_new' || $item_result eq 'replace') { |
680 |
if ($item_result eq 'create_new' || $item_result eq 'replace') { |