From 0ea53e40b8be45fb4cfc7187e77bc69280e7dc47 Mon Sep 17 00:00:00 2001 From: Eric Garcia Date: Thu, 8 Aug 2024 19:13:40 +0000 Subject: [PATCH] Bug 32055: Removed GetImportRecordMatches subroutine Signed-off-by: William Lavoie --- C4/ImportBatch.pm | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 5aebaafacf..3c132d05bf 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1460,43 +1460,6 @@ sub SetImportRecordStatus { } -=head2 GetImportRecordMatches - - my $results = GetImportRecordMatches($import_record_id, $best_only); - -=cut - -sub GetImportRecordMatches { - my $import_record_id = shift; - my $best_only = @_ ? shift : 0; - - my $dbh = C4::Context->dbh; - # FIXME currently biblio only - my $sth = $dbh->prepare_cached("SELECT title, author, biblionumber, - candidate_match_id, score, record_type, - chosen - FROM import_records - JOIN import_record_matches USING (import_record_id) - LEFT JOIN biblio ON (biblionumber = candidate_match_id) - WHERE import_record_id = ? - ORDER BY score DESC, biblionumber DESC"); - $sth->bind_param(1, $import_record_id); - my $results = []; - $sth->execute(); - while (my $row = $sth->fetchrow_hashref) { - if ($row->{'record_type'} eq 'auth') { - $row->{'authorized_heading'} = GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } ); - } - next if ($row->{'record_type'} eq 'biblio' && not $row->{'biblionumber'}); - push @$results, $row; - last if $best_only; - } - $sth->finish(); - - return $results; - -} - =head2 SetImportRecordMatches SetImportRecordMatches($import_record_id, @matches); -- 2.43.0