From 794a015d201adcf4f17dfb73a18632258c14fc6a Mon Sep 17 00:00:00 2001
From: David Cook <dcook@prosentient.com.au>
Date: Thu, 7 Jan 2016 14:24:34 +1100
Subject: [PATCH] Bug 12586 - Record matching rules - Required match checks
 doesn't work with MARCXML (follow-up)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The follow-up fixes a typo ('auth' to 'authority') and removes 'target_result' and 'target_biblio'
which were introduced, seemingly unnecessarily, by the first patch in the set.

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
---
 C4/Matcher.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/Matcher.pm b/C4/Matcher.pm
index 8a823a3..1465ff3 100644
--- a/C4/Matcher.pm
+++ b/C4/Matcher.pm
@@ -711,7 +711,7 @@ sub get_matches {
 
     # get rid of any that don't meet the required checks
     %matches = map { _passes_required_checks($source_record, $matches{$_}->{record}, $self->{'required_checks'}) ?  ($_ => $matches{$_}) : () }
-                keys %matches unless ($self->{'record_type'} eq 'auth');
+                keys %matches unless ($self->{'record_type'} eq 'authority');
 
     my @results = ();
     if ($self->{'record_type'} eq 'biblio') {
@@ -721,7 +721,7 @@ sub get_matches {
             my $record_number;
             my $result = C4::Biblio::TransformMarcToKoha($target_record, '');
             $record_number = $result->{'biblionumber'};
-            push @results, { 'record_id' => $record_number, 'score' => $matches{$hashkey}->{score}, 'target_record' => $target_record, 'target_biblio' => $result };
+            push @results, { 'record_id' => $record_number, 'score' => $matches{$hashkey}->{score}, };
         }
     } elsif ($self->{'record_type'} eq 'authority') {
         require C4::AuthoritiesMarc;
-- 
2.1.4