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

(-)a/C4/Breeding.pm (-3 / +8 lines)
Lines 431-436 sub ImportBreedingAuth { Link Here
431
    my $searchbreeding = $dbh->prepare("select import_record_id from import_auths where control_number=? and authorized_heading=?");
431
    my $searchbreeding = $dbh->prepare("select import_record_id from import_auths where control_number=? and authorized_heading=?");
432
432
433
#     $encoding = C4::Context->preference("marcflavour") unless $encoding;
433
#     $encoding = C4::Context->preference("marcflavour") unless $encoding;
434
    my $marc_type = C4::Context->preference('marcflavour');
435
    $marc_type .= 'AUTH' if ($marc_type eq 'UNIMARC');
436
434
    # fields used for import results
437
    # fields used for import results
435
    my $imported=0;
438
    my $imported=0;
436
    my $alreadyindb = 0;
439
    my $alreadyindb = 0;
Lines 440-446 sub ImportBreedingAuth { Link Here
440
    for (my $i=0;$i<=$#marcarray;$i++) {
443
    for (my $i=0;$i<=$#marcarray;$i++) {
441
        my ($marcrecord, $charset_result, $charset_errors);
444
        my ($marcrecord, $charset_result, $charset_errors);
442
        ($marcrecord, $charset_result, $charset_errors) =
445
        ($marcrecord, $charset_result, $charset_errors) =
443
            MarcToUTF8Record($marcarray[$i]."\x1D", C4::Context->preference("marcflavour"), $encoding);
446
            MarcToUTF8Record($marcarray[$i]."\x1D", $marc_type, $encoding);
444
447
445
        # Normalize the record so it doesn't have separated diacritics
448
        # Normalize the record so it doesn't have separated diacritics
446
        SetUTF8Flag($marcrecord);
449
        SetUTF8Flag($marcrecord);
Lines 542-547 sub Z3950SearchAuth { Link Here
542
    my $query;
545
    my $query;
543
    my $nterms=0;
546
    my $nterms=0;
544
547
548
    my $marc_type = C4::Context->preference('marcflavour');
549
    $marc_type .= 'AUTH' if ($marc_type eq 'UNIMARC');
550
545
    if ($nameany) {
551
    if ($nameany) {
546
        $query .= " \@attr 1=1002 \"$nameany\" "; #Any name (this includes personal, corporate, meeting/conference authors, and author names in subject headings)
552
        $query .= " \@attr 1=1002 \"$nameany\" "; #Any name (this includes personal, corporate, meeting/conference authors, and author names in subject headings)
547
        #This attribute is supported by both the Library of Congress and Libraries Australia 08/05/2013
553
        #This attribute is supported by both the Library of Congress and Libraries Australia 08/05/2013
Lines 655-661 sub Z3950SearchAuth { Link Here
655
                            $marcdata   = $rec->raw();
661
                            $marcdata   = $rec->raw();
656
662
657
                            my ($charset_result, $charset_errors);
663
                            my ($charset_result, $charset_errors);
658
                            ($marcrecord, $charset_result, $charset_errors)= MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]);
664
                            ($marcrecord, $charset_result, $charset_errors)= MarcToUTF8Record($marcdata, $marc_type, $encoding[$k]);
659
665
660
                            my $heading;
666
                            my $heading;
661
                            my $heading_authtype_code;
667
                            my $heading_authtype_code;
662
- 

Return to bug 13296