From 10c5c9338ab8283c977040d9c565a2b135163a1b 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 | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index b476da0e513..bc846f088ed 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1530,46 +1530,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.39.5