From 185ff3d26a7cbfb3dcb605e684f5637d73d0d33a Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 21 Sep 2009 22:39:49 +0200 Subject: [PATCH] (bug #3592) fix scan of terms Signed-off-by: Henri-Damien LAURENT --- C4/Search.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 885e39c238..353c5abded 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1392,16 +1392,19 @@ sub searchResults { # We get the biblionumber position in MARC my ($bibliotag,$bibliosubf)=GetMarcFromKohaField('biblio.biblionumber',''); - my $fw; + my $fw = ''; # loop through all of the records we've retrieved for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] ); - if ($bibliotag<10){ - $fw = GetFrameworkCode($marcrecord->field($bibliotag)->data); - }else{ - $fw = GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); + if(not $scan){ + if ($bibliotag<10){ + $biblionumber = $marcrecord->field($bibliotag)->data; + }else{ + $biblionumber = $marcrecord->subfield($bibliotag,$bibliosubf); + } + $fw = GetFrameworkCode($biblionumber); } my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); -- 2.39.5