From 7227fefce3ead0552ad973e483dd5e4083f88c06 Mon Sep 17 00:00:00 2001 From: Admin User Koha Date: Mon, 21 Oct 2013 09:35:02 +0200 Subject: [PATCH] Bug 7419: delete bad authorities after merge --- C4/AuthoritiesMarc.pm | 2 +- misc/migration_tools/dedup_authorities.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index e791e53..2d463fe 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1496,7 +1496,7 @@ sub merge { push @editedbiblios, $biblionumber; } }#foreach $marc - + DelAuthority($mergefrom) if ($mergefrom != $mergeto); return @editedbiblios; } diff --git a/misc/migration_tools/dedup_authorities.pl b/misc/migration_tools/dedup_authorities.pl index 47e7eb0..02a8177 100755 --- a/misc/migration_tools/dedup_authorities.pl +++ b/misc/migration_tools/dedup_authorities.pl @@ -143,10 +143,10 @@ for my $authtypecode (@authtypecodes) { ($verbose >= 2) and logger("Building query..."); my $query = _build_query( $authrecord, $attempt ); ($verbose >= 2) and logger("Building query done."); - $debug and $query and warn $query; + ($verbose >= 2) and logger ($query); # This prevent too general queries to be executed # TODO: This should allow more than these 3 indexes - next unless $query =~ /(he|he-main|ident)(,\S*)*(=|:)/; + next unless $query =~ /(ppn|he|he-main|ident)(,\S*)*(=|:)/; ($verbose >= 2) and logger("Searching..."); my ($error, $results) = SimpleSearch($query, undef, undef, ["authorityserver"]); -- 1.7.2.5