Lines 61-89
if ($merge) {
Link Here
|
61 |
# This triggers a merge for the biblios attached to $recordid1 |
61 |
# This triggers a merge for the biblios attached to $recordid1 |
62 |
ModAuthority( $recordid1, $record, $typecode ); |
62 |
ModAuthority( $recordid1, $record, $typecode ); |
63 |
|
63 |
|
64 |
# We still need a merge for biblios attached to $recordid2 |
64 |
# Now merge for biblios attached to $recordid2 |
65 |
if( C4::Context->preference('dontmerge') ne '1' ) { |
65 |
# We ignore dontpref now, since recordid2 is deleted |
66 |
my $MARCfrom = GetAuthority( $recordid2 ); |
66 |
my $MARCfrom = GetAuthority( $recordid2 ); |
67 |
&merge( $recordid2, $MARCfrom, $recordid1, $record ); |
67 |
&merge( $recordid2, $MARCfrom, $recordid1, $record ); |
68 |
} else { |
|
|
69 |
my $dbh = C4::Context->dbh; |
70 |
my $sqlinsert = "INSERT INTO need_merge_authorities (authid, done) VALUES (?,?)"; |
71 |
$dbh->do( $sqlinsert, undef, ( $recordid1, 0 ) ); |
72 |
} |
73 |
|
68 |
|
74 |
# Deleting the other record |
69 |
# Deleting the other record |
75 |
if ( scalar(@errors) == 0 ) { |
70 |
DelAuthority( $recordid2 ); |
76 |
|
|
|
77 |
my $error; |
78 |
if ($input->param('mergereference') eq 'breeding') { |
79 |
require C4::ImportBatch; |
80 |
C4::ImportBatch::SetImportRecordStatus( $recordid2, 'imported' ); |
81 |
} else { |
82 |
C4::AuthoritiesMarc::merge( $recordid2, GetAuthority($recordid2), $recordid1, $record ); |
83 |
$error = (DelAuthority($recordid2) == 0); |
84 |
} |
85 |
push @errors, $error if ($error); |
86 |
} |
87 |
|
71 |
|
88 |
# Parameters |
72 |
# Parameters |
89 |
$template->param( |
73 |
$template->param( |
90 |
- |
|
|