diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 8f86ab96d7..79f3956f34 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1363,8 +1363,8 @@ sub merge { } else { #zebra connection my $oConnection=C4::Context->Zconn("biblioserver",0); - my $oldSyntax = $oConnection->option("preferredRecordSyntax"); - $oConnection->option("preferredRecordSyntax"=>"XML"); + # We used to use XML syntax here, but that no longer works. + # Thankfully, we don't need it. my $query; $query= "an=".$mergefrom; my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection )); @@ -1377,7 +1377,7 @@ sub merge { my $rec; $rec=$oResult->record($z); my $marcdata = $rec->raw(); - my $marcrecordzebra= MARC::Record->new_from_xml($marcdata,"utf8",C4::Context->preference("marcflavour")); + my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata); my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' ); my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield); my $marcrecorddb=GetMarcBiblio($i); @@ -1385,7 +1385,6 @@ sub merge { $z++; } $oResult->destroy(); - $oConnection->option("preferredRecordSyntax"=>$oldSyntax); } #warn scalar(@reccache)." biblios to update"; # Get All candidate Tags for the change