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

(-)a/C4/Biblio.pm (+26 lines)
Lines 121-126 BEGIN { Link Here
121
      &TransformHtmlToXml
121
      &TransformHtmlToXml
122
      &PrepareItemrecordDisplay
122
      &PrepareItemrecordDisplay
123
      &GetNoZebraIndexes
123
      &GetNoZebraIndexes
124
      &RemoveItemsAndAuthidsFromRecord
124
    );
125
    );
125
}
126
}
126
127
Lines 2490-2495 sub GetNoZebraIndexes { Link Here
2490
    return %indexes;
2491
    return %indexes;
2491
}
2492
}
2492
2493
2494
=head2 RemoveItemsAndAuthidsFromRecord
2495
2496
  RemoveItemsAndAuthidsFromRecord($record);
2497
2498
  Remove all items (952) from the record.
2499
  Also removes all authids (subfield 9 in headings)
2500
2501
=cut
2502
2503
sub RemoveItemsAndAuthidsFromRecord {
2504
    my $record = shift;
2505
2506
    # Remove all the items (952) from the record
2507
    foreach my $item ($record->field('952')) {
2508
        $record->delete_field($item);
2509
    }
2510
2511
    # Remove all authid links ($9) in the record
2512
    foreach my $heading qw(100 110 111 130 440 600 610 611 630 648 650 651 655 700 710 711 730 800 810 811 830) {
2513
        foreach my $field ($record->field($heading)) {
2514
            $field->delete_subfield(code => '9');
2515
        }
2516
    }
2517
}
2518
2493
=head1 INTERNAL FUNCTIONS
2519
=head1 INTERNAL FUNCTIONS
2494
2520
2495
=head2 _DelBiblioNoZebra($biblionumber,$record,$server);
2521
=head2 _DelBiblioNoZebra($biblionumber,$record,$server);
(-)a/acqui/neworderempty.pl (-4 / +2 lines)
Lines 132-141 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
132
    my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'});
132
    my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'});
133
    die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
133
    die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
134
134
135
    # Remove all the items (952) from the imported record
135
    # Do a cleanup on the imported record
136
    foreach my $item ($marcrecord->field('952')) {
136
    RemoveItemsAndAuthidsFromRecord($marcrecord);
137
        $marcrecord->delete_field($item);
138
    }
139
137
140
    my $duplicatetitle;
138
    my $duplicatetitle;
141
#look for duplicates
139
#look for duplicates
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 889-894 if (($biblionumber) && !($breedingid)){ Link Here
889
}
889
}
890
if ($breedingid) {
890
if ($breedingid) {
891
    ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;
891
    ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;
892
    RemoveItemsAndAuthidsFromRecord($record) if $record;
892
}
893
}
893
894
894
$is_a_modif = 0;
895
$is_a_modif = 0;
895
- 

Return to bug 6681