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

(-)a/C4/Biblio.pm (-43 lines)
Lines 3461-3509 sub ModBiblioMarc { Link Here
3461
        # the previous version of the record
3461
        # the previous version of the record
3462
        $oldRecord = GetMarcBiblio($biblionumber);
3462
        $oldRecord = GetMarcBiblio($biblionumber);
3463
    }
3463
    }
3464
    # 
3465
    if (C4::Context->preference("IsbnIssnRemoveHyphens")){
3466
           my $isbn;
3467
           my $issn;
3468
               if ( $encoding eq 'UNIMARC' ) {
3469
                       if ( my $f010 = $record->field('010') ) {
3470
                               if ( $f010->subfield('a') ) {
3471
                                       $isbn = $f010->subfield('a');
3472
                                       $isbn =~ s/-//g;
3473
                                       $f010->update( 'a' => $isbn );
3474
                               }
3475
                       }
3476
                       if ( my $f011 = $record->field('011') ) {
3477
                               if ( $f011->subfield('a') ) {
3478
                                       $issn = $f011->subfield('a');
3479
                                       $issn =~ s/-//g;
3480
                                       $f011->update( 'a' => $issn );
3481
                               }
3482
                       }
3483
               } elsif ($encoding eq 'MARC21') {
3484
                       if ( my $f020 = $record->field('020') ) {
3485
                               $isbn = $f020->subfield('a');
3486
                               $isbn =~ s/-//g;
3487
                               $f020->update( 'a' => $isbn );
3488
                       }
3489
                       if ( my $f022 = $record->field('022') ) {
3490
                               $issn = $f022->subfield('a');
3491
                               $issn =~ s/-//g;
3492
                               $f022->update( 'a' => $issn );
3493
                       }
3494
               } elsif ($encoding eq 'NORMARC') {
3495
                       if ( my $f020 = $record->field('020') ) {
3496
                               $isbn = $f020->subfield('a');
3497
                               $isbn =~ s/-//g;
3498
                               $f020->update( 'a' => $isbn );
3499
                       }
3500
                       if ( my $f022 = $record->field('022') ) {
3501
                               $issn = $f022->subfield('a');
3502
                               $issn =~ s/-//g;
3503
                               $f022->update( 'a' => $issn );
3504
                       }
3505
               }
3506
    }
3507
    $sth = $dbh->prepare("UPDATE biblioitems SET marc=?,marcxml=? WHERE biblionumber=?");
3464
    $sth = $dbh->prepare("UPDATE biblioitems SET marc=?,marcxml=? WHERE biblionumber=?");
3508
    $sth->execute( $record->as_usmarc(), $record->as_xml_record($encoding), $biblionumber );
3465
    $sth->execute( $record->as_usmarc(), $record->as_xml_record($encoding), $biblionumber );
3509
    $sth->finish;
3466
    $sth->finish;
(-)a/misc/cronjobs/zebraqueue_start.pl (-1 / +33 lines)
Lines 58-63 while (($id,$biblionumber,$operation,$server)=$readsth->fetchrow){ Link Here
58
            # get the XML
58
            # get the XML
59
            if ($server eq "biblioserver") {
59
            if ($server eq "biblioserver") {
60
                my $marc = GetMarcBiblio($biblionumber);
60
                my $marc = GetMarcBiblio($biblionumber);
61
			    # 
62
			    if ($marc && C4::Context->preference("IsbnIssnRemoveHyphens")){
63
			           my $isbn;
64
			           my $issn;
65
			           my $encoding = C4::Context->preference("marcflavour");
66
			               if ( $encoding eq 'UNIMARC' ) {
67
			                       if ( my $f010 = $marc->field('010') ) {
68
			                               if ( $f010->subfield('a') ) {
69
			                                       $isbn = $f010->subfield('a');
70
			                                       $isbn =~ s/-//g;
71
			                                       $f010->update( 'a' => $isbn );
72
			                               }
73
			                       }
74
			                       if ( my $f011 = $marc->field('011') ) {
75
			                               if ( $f011->subfield('a') ) {
76
			                                       $issn = $f011->subfield('a');
77
			                                       $issn =~ s/-//g;
78
			                                       $f011->update( 'a' => $issn );
79
			                               }
80
			                       }
81
			               } elsif ($encoding eq 'MARC21' || $encoding eq 'NORMARC') {
82
			                       if ( my $f020 = $marc->field('020') ) {
83
			                               $isbn = $f020->subfield('a');
84
			                               $isbn =~ s/-//g;
85
			                               $f020->update( 'a' => $isbn );
86
			                       }
87
			                       if ( my $f022 = $marc->field('022') ) {
88
			                               $issn = $f022->subfield('a');
89
			                               $issn =~ s/-//g;
90
			                               $f022->update( 'a' => $issn );
91
			                       }
92
			               }
93
			    }
61
                $marcxml = $marc->as_xml_record() if $marc;
94
                $marcxml = $marc->as_xml_record() if $marc;
62
            } elsif ($server eq "authorityserver") {
95
            } elsif ($server eq "authorityserver") {
63
                $marcxml =C4::AuthoritiesMarc::GetAuthorityXML($biblionumber);
96
                $marcxml =C4::AuthoritiesMarc::GetAuthorityXML($biblionumber);
64
- 

Return to bug 6590