Bug 20805: Update child to adult patron process broken on several patron-related...
[koha.git] / C4 / Breeding.pm
index 18bf03b..324bb7c 100644 (file)
@@ -31,11 +31,9 @@ use C4::Languages;
 use Koha::Database;
 use Koha::XSLT_Handler;
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 BEGIN {
-       # set the version for version checking
-    $VERSION = 3.07.00.049;
        require Exporter;
        @ISA = qw(Exporter);
     @EXPORT = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth);
@@ -318,7 +316,7 @@ sub _do_xslt_proc {
     if( !$xslh->err ) {
         return MARC::Record->new_from_xml($xml, 'UTF-8');
     } else {
-        return ( $marc, 'xslt_err' ); #original record in case of errors
+        return ( $marc, $xslh->err ); #original record in case of errors
     }
 }
 
@@ -334,9 +332,7 @@ sub _add_rowdata {
         date2 => 'biblioitems.publicationyear', #UNIMARC
     );
     foreach my $k (keys %fetch) {
-        my ($t, $f)= split '\.', $fetch{$k};
-        $row= C4::Biblio::TransformMarcToKohaOneField($t, $f, $record, $row);
-        $row->{$k}= $row->{$f} if $k ne $f;
+        $row->{$k} = C4::Biblio::TransformMarcToKohaOneField( $fetch{$k}, $record );
     }
     $row->{date}//= $row->{date2};
     $row->{isbn}=_isbn_replace($row->{isbn});