Lines 222-236
sub store {
Link Here
|
222 |
|
222 |
|
223 |
my $original = Koha::Items->find( $self->itemnumber ); # $original will be undef if $action eq 'create' |
223 |
my $original = Koha::Items->find( $self->itemnumber ); # $original will be undef if $action eq 'create' |
224 |
my $result = $self->SUPER::store; |
224 |
my $result = $self->SUPER::store; |
|
|
225 |
$self->discard_changes; |
225 |
if ( $log_action && C4::Context->preference("CataloguingLog") ) { |
226 |
if ( $log_action && C4::Context->preference("CataloguingLog") ) { |
226 |
$action eq 'create' |
227 |
$action eq 'create' |
227 |
? logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" ) |
228 |
? logaction( "CATALOGUING", "ADD", $self->itemnumber, 'item', undef, $self ) |
228 |
: logaction( "CATALOGUING", "MODIFY", $self->itemnumber, $self, undef, $original ); |
229 |
: logaction( "CATALOGUING", "MODIFY", $self->itemnumber, $self, undef, $original ); |
229 |
} |
230 |
} |
230 |
my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); |
231 |
my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); |
231 |
$indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" ) |
232 |
$indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" ) |
232 |
unless $params->{skip_record_index}; |
233 |
unless $params->{skip_record_index}; |
233 |
$self->get_from_storage->_after_item_action_hooks({ action => $action }); |
234 |
$self->_after_item_action_hooks({ action => $action }); |
234 |
|
235 |
|
235 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
236 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
236 |
{ |
237 |
{ |
237 |
- |
|
|