View | Details | Raw Unified | Return to bug 8743
Collapse All | Expand All

(-)a/C4/AuthoritiesMarc.pm (-5 / +3 lines)
Lines 1406-1413 sub merge { Link Here
1406
    } else {
1406
    } else {
1407
        #zebra connection  
1407
        #zebra connection  
1408
        my $oConnection=C4::Context->Zconn("biblioserver",0);
1408
        my $oConnection=C4::Context->Zconn("biblioserver",0);
1409
        my $oldSyntax = $oConnection->option("preferredRecordSyntax");
1409
        # We used to use XML syntax here, but that no longer works.
1410
        $oConnection->option("preferredRecordSyntax"=>"XML");
1410
        # Thankfully, we don't need it.
1411
        my $query;
1411
        my $query;
1412
        $query= "an=".$mergefrom;
1412
        $query= "an=".$mergefrom;
1413
        my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection ));
1413
        my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection ));
Lines 1420-1426 sub merge { Link Here
1420
            my $rec;
1420
            my $rec;
1421
            $rec=$oResult->record($z);
1421
            $rec=$oResult->record($z);
1422
            my $marcdata = $rec->raw();
1422
            my $marcdata = $rec->raw();
1423
            my $marcrecordzebra= MARC::Record->new_from_xml($marcdata,"utf8",C4::Context->preference("marcflavour"));
1423
            my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata);
1424
            my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' );
1424
            my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' );
1425
            my $bibnum;
1425
            my $bibnum;
1426
            if ($biblionumbertagfield < 10) {
1426
            if ($biblionumbertagfield < 10) {
Lines 1434-1440 sub merge { Link Here
1434
            $z++;
1434
            $z++;
1435
        }
1435
        }
1436
        $oResult->destroy();
1436
        $oResult->destroy();
1437
        $oConnection->option("preferredRecordSyntax"=>$oldSyntax);
1438
    }
1437
    }
1439
1438
1440
    #warn scalar(@reccache)." biblios to update";
1439
    #warn scalar(@reccache)." biblios to update";
1441
- 

Return to bug 8743