|
Lines 166-183
sub process {
Link Here
|
| 166 |
|
166 |
|
| 167 |
$args ||= {}; |
167 |
$args ||= {}; |
| 168 |
|
168 |
|
| 169 |
my $context = decode_json($self->context); |
169 |
if ( $self->context ) { |
| 170 |
C4::Context->_new_userenv(-1); |
170 |
my $context = decode_json($self->context); |
| 171 |
C4::Context->interface( $context->{interface} ); |
171 |
C4::Context->_new_userenv(-1); |
| 172 |
C4::Context->set_userenv( |
172 |
C4::Context->interface( $context->{interface} ); |
| 173 |
$context->{number}, $context->{id}, |
173 |
C4::Context->set_userenv( |
| 174 |
$context->{cardnumber}, $context->{firstname}, |
174 |
$context->{number}, $context->{id}, |
| 175 |
$context->{surname}, $context->{branch}, |
175 |
$context->{cardnumber}, $context->{firstname}, |
| 176 |
$context->{branchname}, $context->{flags}, |
176 |
$context->{surname}, $context->{branch}, |
| 177 |
$context->{emailaddress}, undef, |
177 |
$context->{branchname}, $context->{flags}, |
| 178 |
$context->{desk_id}, $context->{desk_name}, |
178 |
$context->{emailaddress}, undef, |
| 179 |
$context->{register_id}, $context->{register_name} |
179 |
$context->{desk_id}, $context->{desk_name}, |
| 180 |
); |
180 |
$context->{register_id}, $context->{register_name} |
|
|
181 |
); |
| 182 |
} |
| 183 |
else { |
| 184 |
Koha::Logger->get->warn(qq{A background job didn't have context defined ($self->id)}); |
| 185 |
} |
| 181 |
|
186 |
|
| 182 |
return $derived_class->process( $args ); |
187 |
return $derived_class->process( $args ); |
| 183 |
} |
188 |
} |