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

(-)a/cataloguing/addbiblio.pl (-1 / +9 lines)
Lines 838-844 if ( $op eq "addbiblio" ) { Link Here
838
        } 
838
        } 
839
        if ( $is_a_modif ) {
839
        if ( $is_a_modif ) {
840
            ModBiblioframework( $biblionumber, $frameworkcode ); 
840
            ModBiblioframework( $biblionumber, $frameworkcode ); 
841
            ModBiblio( $record, $biblionumber, $frameworkcode );
841
            my ($member) = C4::Members::GetMember('borrowernumber' => $loggedinuser);
842
            ModBiblio( $record, $biblionumber, $frameworkcode,
843
                {
844
                    source => $z3950 ? 'z39.50' : 'intranet',
845
                    category => $member->{'category_type'},
846
                    borrower => $loggedinuser
847
                }
848
            );
842
        }
849
        }
843
        else {
850
        else {
844
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
851
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
Lines 931-936 elsif ( $op eq "delete" ) { Link Here
931
    $template->param(
938
    $template->param(
932
        biblionumberdata => $biblionumber,
939
        biblionumberdata => $biblionumber,
933
        op               => $op,
940
        op               => $op,
941
        z3950            => $z3950
934
    );
942
    );
935
    if ( $op eq "duplicate" ) {
943
    if ( $op eq "duplicate" ) {
936
        $biblionumber = "";
944
        $biblionumber = "";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (+2 lines)
Lines 544-550 function Changefwk() { Link Here
544
        <input type="hidden" name="mode" value="popup" />
544
        <input type="hidden" name="mode" value="popup" />
545
[% END %]
545
[% END %]
546
        <input type="hidden" name="op" value="addbiblio" />
546
        <input type="hidden" name="op" value="addbiblio" />
547
        <input type="hidden" name="z3950" value="[% z3950 %]" />
547
        <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" />
548
        <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" />
549
        <input type="hidden" name="z3950" value="[% z3950 %]" />
548
        <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
550
        <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
549
        <input type="hidden" name="breedingid" value="[% breedingid %]" />
551
        <input type="hidden" name="breedingid" value="[% breedingid %]" />
550
        <input type="hidden" name="changed_framework" value="" />
552
        <input type="hidden" name="changed_framework" value="" />
(-)a/misc/migration_tools/bulkmarcimport.pl (-1 / +2 lines)
Lines 417-423 RECORD: while ( ) { Link Here
417
            if ($biblionumber) {
417
            if ($biblionumber) {
418
                eval{$biblioitemnumber=GetBiblioData($biblionumber)->{biblioitemnumber};};
418
                eval{$biblioitemnumber=GetBiblioData($biblionumber)->{biblioitemnumber};};
419
                if ($update) {
419
                if ($update) {
420
                    eval { ( $biblionumber, $biblioitemnumber ) = ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber) ) };
420
                    eval { ( $biblionumber, $biblioitemnumber ) = ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber),
421
                            { source => 'bulkmarcimport' }) };
421
                    if ($@) {
422
                    if ($@) {
422
                        warn "ERROR: Edit biblio $biblionumber failed: $@\n";
423
                        warn "ERROR: Edit biblio $biblionumber failed: $@\n";
423
                        printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile);
424
                        printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile);
(-)a/misc/migration_tools/import_lexile.pl (-1 / +1 lines)
Lines 200-206 while ( my $row = $csv->getline_hr($fh) ) { Link Here
200
            $record->append_fields($field);
200
            $record->append_fields($field);
201
        }
201
        }
202
202
203
        ModBiblio( $record, $biblionumber ) unless ( $test );
203
        ModBiblio( $record, $biblionumber, {source => 'import_lexile'} ) unless ( $test );
204
    }
204
    }
205
205
206
}
206
}
(-)a/tools/batch_record_modification.pl (-4 / +10 lines)
Lines 156-162 if ( $op eq 'form' ) { Link Here
156
    my ( $job );
156
    my ( $job );
157
    if ( $runinbackground ) {
157
    if ( $runinbackground ) {
158
        my $job_size = scalar( @record_ids );
158
        my $job_size = scalar( @record_ids );
159
        $job = C4::BackgroundJob->new( $sessionID, "FIXME", '/cgi-bin/koha/tools/batch_record_modification.pl', $job_size );
159
        $job = C4::BackgroundJob->new( $sessionID, "FIXME", $ENV{SCRIPT_NAME}, $job_size );
160
        my $job_id = $job->id;
160
        my $job_id = $job->id;
161
        if (my $pid = fork) {
161
        if (my $pid = fork) {
162
            $dbh->{InactiveDestroy}  = 1;
162
            $dbh->{InactiveDestroy}  = 1;
Lines 168-174 if ( $op eq 'form' ) { Link Here
168
        } elsif (defined $pid) {
168
        } elsif (defined $pid) {
169
            close STDOUT;
169
            close STDOUT;
170
        } else {
170
        } else {
171
            warn "fork failed while attempting to run tools/batch_record_modification.pl as a background job";
171
            warn "fork failed while attempting to run $ENV{'SCRIPT_NAME'} as a background job";
172
            exit 0;
172
            exit 0;
173
        }
173
        }
174
    }
174
    }
Lines 192-198 if ( $op eq 'form' ) { Link Here
192
                my $record = GetMarcBiblio( $biblionumber );
192
                my $record = GetMarcBiblio( $biblionumber );
193
                ModifyRecordWithTemplate( $mmtid, $record );
193
                ModifyRecordWithTemplate( $mmtid, $record );
194
                my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber );
194
                my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber );
195
                ModBiblio( $record, $biblionumber, $frameworkcode );
195
                my ($member) = C4::Members::GetMember('borrowernumber' => $loggedinuser);
196
                ModBiblio( $record, $biblionumber, $frameworkcode,
197
                    {
198
                        source => 'batchmod',
199
                        category => $member->{'category_type'},
200
                        borrower => $loggedinuser
201
                    }
202
                );
196
            };
203
            };
197
            if ( $error and $error != 1 or $@ ) { # ModBiblio returns 1 if everything as gone well
204
            if ( $error and $error != 1 or $@ ) { # ModBiblio returns 1 if everything as gone well
198
                push @messages, {
205
                push @messages, {
199
- 

Return to bug 14957