$defer_marc_save = 1;
}
+ if (C4::Context->preference('BiblioAddsAuthorities')) {
+ BiblioAutoLink( $record, $frameworkcode );
+ }
+
my ( $biblionumber, $biblioitemnumber, $error );
my $dbh = C4::Context->dbh;
logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $newrecord->as_formatted );
}
+ if (C4::Context->preference('BiblioAddsAuthorities')) {
+ BiblioAutoLink( $record, $frameworkcode );
+ }
+
# Cleaning up invalid fields must be done early or SetUTF8Flag is liable to
# throw an exception which probably won't be handled.
foreach my $field ($record->fields()) {
my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || '';
my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || '';
- # 1st insert the biblio, or find it through matcher
+ # Insert the biblio, or find it through matcher
unless ( $biblionumber ) {
if ($matcher_id) {
if ( $matcher_id eq '_TITLE_AUTHOR_' ) {
}
( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' );
SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
- # 2nd add authorities if applicable
- if (C4::Context->preference("BiblioAddsAuthorities")){
- my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'});
- }
} else {
SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
}
exit;
}
#from this point: add a new record
- if (C4::Context->preference("BiblioAddsAuthorities")){
- my $headings_linked=BiblioAutoLink($marcrecord, $params->{'frameworkcode'});
- }
my $bibitemnum;
$params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
if ( !$duplicatebiblionumber or $confirm_not_duplicate ) {
my $oldbibitemnum;
- if (C4::Context->preference("BiblioAddsAuthorities")){
- BiblioAutoLink( $record, $frameworkcode );
- }
if ( $is_a_modif ) {
ModBiblio( $record, $biblionumber, $frameworkcode );
}