Lines 24-32
use C4::Auth qw( get_template_and_user );
Link Here
|
24 |
use C4::AuthoritiesMarc qw( GetAuthority ModAuthority DelAuthority GetTagsLabels merge ); |
24 |
use C4::AuthoritiesMarc qw( GetAuthority ModAuthority DelAuthority GetTagsLabels merge ); |
25 |
use C4::Biblio qw( TransformHtmlToMarc ); |
25 |
use C4::Biblio qw( TransformHtmlToMarc ); |
26 |
|
26 |
|
|
|
27 |
use Koha::Authorities; |
27 |
use Koha::Authority::MergeRequests; |
28 |
use Koha::Authority::MergeRequests; |
28 |
use Koha::Authority::Types; |
29 |
use Koha::Authority::Types; |
29 |
use Koha::MetadataRecord::Authority; |
30 |
use Koha::MetadataRecord::Authority; |
|
|
31 |
use Koha::Plugins; |
30 |
|
32 |
|
31 |
my $input = CGI->new; |
33 |
my $input = CGI->new; |
32 |
my @authid = $input->multi_param('authid'); |
34 |
my @authid = $input->multi_param('authid'); |
Lines 73-78
if ($op eq 'cud-merge') {
Link Here
|
73 |
$record->leader( $authrec->leader() ); |
75 |
$record->leader( $authrec->leader() ); |
74 |
} |
76 |
} |
75 |
|
77 |
|
|
|
78 |
my $authority = Koha::Authorities->find($recordid1); |
79 |
Koha::Plugins->call( |
80 |
'before_authority_action', |
81 |
{ |
82 |
action => 'merge', |
83 |
authority => $authority, |
84 |
authority_id => $recordid1, |
85 |
record => $record, |
86 |
merged_authority_ids => [$recordid2], |
87 |
} |
88 |
); |
89 |
|
76 |
# Modifying the reference record |
90 |
# Modifying the reference record |
77 |
# This triggers a merge for the biblios attached to $recordid1 |
91 |
# This triggers a merge for the biblios attached to $recordid1 |
78 |
ModAuthority( $recordid1, $record, $typecode ); |
92 |
ModAuthority( $recordid1, $record, $typecode ); |