Bug 7921: Software error while placing order
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Wed, 31 Oct 2012 13:26:31 +0000 (14:26 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 10 Nov 2012 01:19:10 +0000 (20:19 -0500)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Biblio.pm
acqui/neworderempty.pl

index afb60d3..eb213d5 100644 (file)
@@ -1199,13 +1199,14 @@ sub GetUsedMarcStructure {
   ($MARCfield,$MARCsubfield)=GetMarcFromKohaField($kohafield,$frameworkcode);
 
 Returns the MARC fields & subfields mapped to the koha field 
-for the given frameworkcode
+for the given frameworkcode or default framework if $frameworkcode is missing
 
 =cut
 
 sub GetMarcFromKohaField {
-    my ( $kohafield, $frameworkcode ) = @_;
-    return (0, undef) unless $kohafield and defined $frameworkcode;
+    my $kohafield = shift;
+    my $frameworkcode = shift || '';
+    return (0, undef) unless $kohafield;
     my $relations = C4::Context->marcfromkohafield;
     if ( my $mf = $relations->{$frameworkcode}->{$kohafield} ) {
         return @$mf;
index 4144033..965eeef 100755 (executable)
@@ -451,7 +451,7 @@ sub MARCfindbreeding {
             if (    C4::Context->preference("z3950NormalizeAuthor")
                 and C4::Context->preference("z3950AuthorAuthFields") )
             {
-                my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author");
+                my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author", '');
 
 #                 my $summary = C4::Context->preference("z3950authortemplate");
                 my $auth_fields =