From 1b9c25f741549be307f5d247a0561d722270baa3 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 31 Oct 2012 14:26:31 +0100 Subject: [PATCH] Bug 7921: Software error while placing order Signed-off-by: Chris Cormack Passed-QA-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- C4/Biblio.pm | 7 ++++--- acqui/neworderempty.pl | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index e798ecf6ef..a8ebd396af 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1200,13 +1200,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; diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 08c124c1c5..1d82152682 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -440,7 +440,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 = -- 2.39.5