Lines 1340-1347
sub merge {
Link Here
|
1340 |
} else { |
1340 |
} else { |
1341 |
#zebra connection |
1341 |
#zebra connection |
1342 |
my $oConnection=C4::Context->Zconn("biblioserver",0); |
1342 |
my $oConnection=C4::Context->Zconn("biblioserver",0); |
1343 |
my $oldSyntax = $oConnection->option("preferredRecordSyntax"); |
1343 |
# We used to use XML syntax here, but that no longer works. |
1344 |
$oConnection->option("preferredRecordSyntax"=>"XML"); |
1344 |
# Thankfully, we don't need it. |
1345 |
my $query; |
1345 |
my $query; |
1346 |
$query= "an=".$mergefrom; |
1346 |
$query= "an=".$mergefrom; |
1347 |
my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection )); |
1347 |
my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection )); |
Lines 1354-1360
sub merge {
Link Here
|
1354 |
my $rec; |
1354 |
my $rec; |
1355 |
$rec=$oResult->record($z); |
1355 |
$rec=$oResult->record($z); |
1356 |
my $marcdata = $rec->raw(); |
1356 |
my $marcdata = $rec->raw(); |
1357 |
my $marcrecordzebra= MARC::Record->new_from_xml($marcdata,"utf8",C4::Context->preference("marcflavour")); |
1357 |
my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata); |
1358 |
my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' ); |
1358 |
my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' ); |
1359 |
my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield); |
1359 |
my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield); |
1360 |
my $marcrecorddb=GetMarcBiblio($i); |
1360 |
my $marcrecorddb=GetMarcBiblio($i); |
Lines 1362-1368
sub merge {
Link Here
|
1362 |
$z++; |
1362 |
$z++; |
1363 |
} |
1363 |
} |
1364 |
$oResult->destroy(); |
1364 |
$oResult->destroy(); |
1365 |
$oConnection->option("preferredRecordSyntax"=>$oldSyntax); |
|
|
1366 |
} |
1365 |
} |
1367 |
#warn scalar(@reccache)." biblios to update"; |
1366 |
#warn scalar(@reccache)." biblios to update"; |
1368 |
# Get All candidate Tags for the change |
1367 |
# Get All candidate Tags for the change |
1369 |
- |
|
|