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

(-)a/C4/AuthoritiesMarc.pm (-4 / +4 lines)
Lines 661-678 sub DelAuthority { Link Here
661
661
662
=head2 ModAuthority
662
=head2 ModAuthority
663
663
664
  $authid= &ModAuthority($authid,$record,$authtypecode)
664
  $authid= &ModAuthority($authid,$record,$authtypecode, [ { skip_merge => 1 ] )
665
665
666
Modifies authority record, optionally updates attached biblios.
666
Modifies authority record, optionally updates attached biblios.
667
The parameter skip_merge is optional and should be used with care.
667
668
668
=cut
669
=cut
669
670
670
sub ModAuthority {
671
sub ModAuthority {
671
    my ( $authid, $record, $authtypecode ) = @_;
672
    my ( $authid, $record, $authtypecode, $params ) = @_;
672
    my $oldrecord = GetAuthority($authid);
673
    my $oldrecord = GetAuthority($authid);
673
    #Now rewrite the $record to table with an add
674
    #Now rewrite the $record to table with an add
674
    $authid = AddAuthority($record, $authid, $authtypecode);
675
    $authid = AddAuthority($record, $authid, $authtypecode);
675
    merge({ mergefrom => $authid, MARCfrom => $oldrecord, mergeto => $authid, MARCto => $record });
676
    merge({ mergefrom => $authid, MARCfrom => $oldrecord, mergeto => $authid, MARCto => $record }) if !$params->{skip_merge};
676
    logaction( "AUTHORITIES", "MODIFY", $authid, "authority BEFORE=>" . $oldrecord->as_formatted ) if C4::Context->preference("AuthoritiesLog");
677
    logaction( "AUTHORITIES", "MODIFY", $authid, "authority BEFORE=>" . $oldrecord->as_formatted ) if C4::Context->preference("AuthoritiesLog");
677
    return $authid;
678
    return $authid;
678
}
679
}
679
- 

Return to bug 25313