From f6685ba28b79a1c306f6d74fe3fc16534c3d0985 Mon Sep 17 00:00:00 2001 From: Juan Romay Sieira Date: Mon, 18 Jul 2011 12:50:45 +0200 Subject: [PATCH 37/37] [Bug 6590] - Path to apply after the second one. File misc/bin/zebraqueue_daemon.pl changed too, I missed in the first commit. Content-Type: text/plain; charset="utf-8" --- misc/bin/zebraqueue_daemon.pl | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/misc/bin/zebraqueue_daemon.pl b/misc/bin/zebraqueue_daemon.pl index 6181a94..87ce541 100755 --- a/misc/bin/zebraqueue_daemon.pl +++ b/misc/bin/zebraqueue_daemon.pl @@ -227,6 +227,39 @@ sub process_update { my $marcxml; if ($server eq "biblioserver") { my $marc = GetMarcBiblio($record_number); + # + if ($marc && C4::Context->preference("IsbnIssnRemoveHyphens")){ + my $isbn; + my $issn; + my $encoding = C4::Context->preference("marcflavour"); + if ( $encoding eq 'UNIMARC' ) { + if ( my $f010 = $marc->field('010') ) { + if ( $f010->subfield('a') ) { + $isbn = $f010->subfield('a'); + $isbn =~ s/-//g; + $f010->update( 'a' => $isbn ); + } + } + if ( my $f011 = $marc->field('011') ) { + if ( $f011->subfield('a') ) { + $issn = $f011->subfield('a'); + $issn =~ s/-//g; + $f011->update( 'a' => $issn ); + } + } + } elsif ($encoding eq 'MARC21' || $encoding eq 'NORMARC') { + if ( my $f020 = $marc->field('020') ) { + $isbn = $f020->subfield('a'); + $isbn =~ s/-//g; + $f020->update( 'a' => $isbn ); + } + if ( my $f022 = $marc->field('022') ) { + $issn = $f022->subfield('a'); + $issn =~ s/-//g; + $f022->update( 'a' => $issn ); + } + } + } $marcxml = $marc->as_xml_record() if $marc; } elsif ($server eq "authorityserver") { -- 1.7.1