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

(-)a/C4/Biblio.pm (+8 lines)
Lines 234-239 sub AddBiblio { Link Here
234
        $defer_marc_save = 1;
234
        $defer_marc_save = 1;
235
    }
235
    }
236
236
237
    if (C4::Context->preference('BiblioAddsAuthorities')) {
238
        BiblioAutoLink( $record, $frameworkcode );
239
    }
240
237
    my ( $biblionumber, $biblioitemnumber, $error );
241
    my ( $biblionumber, $biblioitemnumber, $error );
238
    my $dbh = C4::Context->dbh;
242
    my $dbh = C4::Context->dbh;
239
243
Lines 295-300 sub ModBiblio { Link Here
295
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $newrecord->as_formatted );
299
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $newrecord->as_formatted );
296
    }
300
    }
297
301
302
    if (C4::Context->preference('BiblioAddsAuthorities')) {
303
        BiblioAutoLink( $record, $frameworkcode );
304
    }
305
298
    # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to
306
    # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to
299
    # throw an exception which probably won't be handled.
307
    # throw an exception which probably won't be handled.
300
    foreach my $field ($record->fields()) {
308
    foreach my $field ($record->fields()) {
(-)a/acqui/addorderiso2709.pl (-5 / +1 lines)
Lines 163-169 if ($op eq ""){ Link Here
163
        my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || '';
163
        my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || '';
164
        my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || '';
164
        my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || '';
165
165
166
        # 1st insert the biblio, or find it through matcher
166
        # Insert the biblio, or find it through matcher
167
        unless ( $biblionumber ) {
167
        unless ( $biblionumber ) {
168
            if ($matcher_id) {
168
            if ($matcher_id) {
169
                if ( $matcher_id eq '_TITLE_AUTHOR_' ) {
169
                if ( $matcher_id eq '_TITLE_AUTHOR_' ) {
Lines 194-203 if ($op eq ""){ Link Here
194
            }
194
            }
195
            ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' );
195
            ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' );
196
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
196
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
197
            # 2nd add authorities if applicable
198
            if (C4::Context->preference("BiblioAddsAuthorities")){
199
                my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'});
200
            }
201
        } else {
197
        } else {
202
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
198
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
203
        }
199
        }
(-)a/acqui/neworderempty.pl (-3 lines)
Lines 164-172 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
164
        exit;
164
        exit;
165
    }
165
    }
166
    #from this point: add a new record
166
    #from this point: add a new record
167
        if (C4::Context->preference("BiblioAddsAuthorities")){
168
            my $headings_linked=BiblioAutoLink($marcrecord, $params->{'frameworkcode'});
169
        }
170
        my $bibitemnum;
167
        my $bibitemnum;
171
        $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
168
        $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
172
        ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
169
        ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
(-)a/cataloguing/addbiblio.pl (-4 lines)
Lines 831-839 if ( $op eq "addbiblio" ) { Link Here
831
    # it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
831
    # it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
832
    if ( !$duplicatebiblionumber or $confirm_not_duplicate ) {
832
    if ( !$duplicatebiblionumber or $confirm_not_duplicate ) {
833
        my $oldbibitemnum;
833
        my $oldbibitemnum;
834
        if (C4::Context->preference("BiblioAddsAuthorities")){
835
            BiblioAutoLink( $record, $frameworkcode );
836
        } 
837
        if ( $is_a_modif ) {
834
        if ( $is_a_modif ) {
838
            ModBiblio( $record, $biblionumber, $frameworkcode );
835
            ModBiblio( $record, $biblionumber, $frameworkcode );
839
        }
836
        }
840
- 

Return to bug 21365