Lines 91-103
sub process {
Link Here
|
91 |
my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); |
91 |
my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); |
92 |
C4::MarcModificationTemplates::ModifyRecordWithTemplate( $mmtid, $record ); |
92 |
C4::MarcModificationTemplates::ModifyRecordWithTemplate( $mmtid, $record ); |
93 |
my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber ); |
93 |
my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber ); |
94 |
C4::Biblio::ModBiblio( $record, $biblionumber, $frameworkcode, |
94 |
C4::Biblio::ModBiblio( $record, $biblionumber, $frameworkcode, { |
95 |
{ |
95 |
context => $args->{context}, |
96 |
source => $args->{source}, |
96 |
}); |
97 |
categorycode => $args->{categorycode}, |
|
|
98 |
userid => $args->{userid}, |
99 |
} |
100 |
); |
101 |
}; |
97 |
}; |
102 |
if ( $error and $error != 1 or $@ ) { # ModBiblio returns 1 if everything as gone well |
98 |
if ( $error and $error != 1 or $@ ) { # ModBiblio returns 1 if everything as gone well |
103 |
push @messages, { |
99 |
push @messages, { |
Lines 140-151
sub enqueue {
Link Here
|
140 |
return unless exists $args->{mmtid}; |
136 |
return unless exists $args->{mmtid}; |
141 |
return unless exists $args->{record_ids}; |
137 |
return unless exists $args->{record_ids}; |
142 |
|
138 |
|
143 |
my $mmtid = $args->{mmtid}; |
|
|
144 |
my @record_ids = @{ $args->{record_ids} }; |
145 |
|
146 |
$self->SUPER::enqueue({ |
139 |
$self->SUPER::enqueue({ |
147 |
job_size => scalar @record_ids, |
140 |
job_size => scalar @{$args->{record_ids}}, |
148 |
job_args => {mmtid => $mmtid, record_ids => \@record_ids,} |
141 |
job_args => $args, |
149 |
}); |
142 |
}); |
150 |
} |
143 |
} |
151 |
|
144 |
|