Bug 5333 - z3950 normalization should apply only on UNIMARC
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 27 Feb 2013 13:47:13 +0000 (10:47 -0300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 1 Mar 2013 00:11:24 +0000 (19:11 -0500)
It's been a while since this bug is around. This normalization is only
used for UNIMARC and yields a fatal error when those variables are set
on (at least) MARC21 setups.

Regards
To+

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: update comment
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

cataloguing/addbiblio.pl

index 51b3c7a..3314f1a 100755 (executable)
@@ -94,9 +94,10 @@ sub MARCfindbreeding {
             return -1;
         }
         else {
-            # normalize author : probably UNIMARC specific...
+            # normalize author : UNIMARC specific...
             if (    C4::Context->preference("z3950NormalizeAuthor")
-                and C4::Context->preference("z3950AuthorAuthFields") )
+                and C4::Context->preference("z3950AuthorAuthFields")
+                and C4::Context->preference("marcflavour") eq 'UNIMARC' )
             {
                 my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author", '');