bulkmarcimport : removing warnings
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 12 Jan 2010 22:47:04 +0000 (23:47 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 28 Jan 2010 14:11:56 +0000 (15:11 +0100)
misc/migration_tools/bulkmarcimport.pl

index 2e583c8..6a8a16b 100755 (executable)
@@ -21,6 +21,7 @@ use MARC::Charset;
 use C4::Context;
 use C4::Biblio;
 use C4::Koha;
+use C4::Debug;
 use C4::Charset;
 use C4::Items;
 use Unicode::Normalize;
@@ -267,16 +268,16 @@ RECORD: while (  ) {
        my $server=($authorities?'authorityserver':'biblioserver');
        my ($error, $results,$totalhits)=C4::Search::SimpleSearch( $query, 0, 3, [$server] );
        die "unable to search the database for duplicates : $error" if (defined $error);
-       warn "$query $server : $totalhits";
+       #warn "$query $server : $totalhits";
        if ($results && scalar(@$results)==1){
            my $marcrecord = MARC::File::USMARC::decode($results->[0]);
                   $id=GetRecordId($marcrecord,$tagid,$subfieldid);
        } 
        elsif  ($results && scalar(@$results)>1){
-       warn "more than one match for $query";
+       $debug && warn "more than one match for $query";
        } 
        else {
-       warn "nomatch for $query";
+       $debug && warn "nomatch for $query";
        }
     }
        my $originalid;