|
Lines 258-264
sub status {
Link Here
|
| 258 |
$current_status_alias : |
258 |
$current_status_alias : |
| 259 |
$current_status; |
259 |
$current_status; |
| 260 |
my $ret = $self->SUPER::status($new_status)->store; |
260 |
my $ret = $self->SUPER::status($new_status)->store; |
| 261 |
if ($ret) { |
261 |
if ($current_status_alias) { |
| 262 |
# This is hackery to enable us to undefine |
262 |
# This is hackery to enable us to undefine |
| 263 |
# status_alias, since we need to have an overloaded |
263 |
# status_alias, since we need to have an overloaded |
| 264 |
# status_alias method to get us around the problem described |
264 |
# status_alias method to get us around the problem described |
|
Lines 267-280
sub status {
Link Here
|
| 267 |
# We need a way of passing implied undef to nullify status_alias |
267 |
# We need a way of passing implied undef to nullify status_alias |
| 268 |
# so we pass -1, which is special cased in the overloaded setter |
268 |
# so we pass -1, which is special cased in the overloaded setter |
| 269 |
$self->status_alias("-1"); |
269 |
$self->status_alias("-1"); |
|
|
270 |
} else { |
| 270 |
my $logger = Koha::Illrequest::Logger->new; |
271 |
my $logger = Koha::Illrequest::Logger->new; |
| 271 |
$logger->log_status_change( |
272 |
$logger->log_status_change( |
| 272 |
$self, |
273 |
$self, |
| 273 |
$new_status |
274 |
$new_status |
| 274 |
); |
275 |
); |
| 275 |
} else { |
|
|
| 276 |
delete $self->{previous_status}; |
| 277 |
} |
276 |
} |
|
|
277 |
delete $self->{previous_status}; |
| 278 |
return $ret; |
278 |
return $ret; |
| 279 |
} else { |
279 |
} else { |
| 280 |
return $current_status; |
280 |
return $current_status; |