Bug 7513 Marc Import Hangs
authorBibLibre <dev_patches@biblibre.com>
Thu, 9 Feb 2012 09:11:36 +0000 (10:11 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 21 Feb 2012 16:02:46 +0000 (17:02 +0100)
On some record, the commit_biblio_file is creating wide
character
because as_xml is not used with correct parameter.
This patch fixes that.
To test on a UNIMARC Koha, stage attachment 7510 and
then import.
It hangs before the patch, it passes after.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/ImportBatch.pm

index b6db406..63cc60b 100644 (file)
@@ -1150,7 +1150,7 @@ sub _update_import_record_marc {
     my $dbh = C4::Context->dbh;
     my $sth = $dbh->prepare("UPDATE import_records SET marc = ?, marcxml = ?
                              WHERE  import_record_id = ?");
-    $sth->execute($marc_record->as_usmarc(), $marc_record->as_xml(), $import_record_id);
+    $sth->execute($marc_record->as_usmarc(), $marc_record->as_xml(C4::Context->preference('marcflavour')), $import_record_id);
     $sth->finish();
 }