Lines 687-693
sub BatchRevertBibRecords {
Link Here
|
687 |
$num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'}); |
687 |
$num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'}); |
688 |
SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted'); |
688 |
SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted'); |
689 |
} |
689 |
} |
690 |
my $sth2 = $dbh->prepare_cached("UPDATE import_biblios LEFT JOIN import_items USING (import_record_id) SET matched_biblionumber = NULL WHERE import_record_id = ? AND status != 'imported'" ); |
690 |
# remove matched_biblionumber only if there is no 'imported' item left |
|
|
691 |
my $sth2 = $dbh->prepare_cached("UPDATE import_biblios SET matched_biblionumber = NULL WHERE import_record_id = ? AND NOT EXISTS (SELECT * FROM import_items WHERE import_items.import_record_id=import_biblios.import_record_id and status='imported')" ); |
691 |
$sth2->execute($rowref->{'import_record_id'}); |
692 |
$sth2->execute($rowref->{'import_record_id'}); |
692 |
} |
693 |
} |
693 |
|
694 |
|
694 |
- |
|
|