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