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

(-)a/C4/Log.pm (-1 / +1 lines)
Lines 88-94 sub logaction { Link Here
88
        local $Data::Dumper::Sortkeys = 1;
88
        local $Data::Dumper::Sortkeys = 1;
89
89
90
        if ( $infos->isa('Koha::Item') && $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) {
90
        if ( $infos->isa('Koha::Item') && $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) {
91
            $infos = "item " . Dumper($updated);
91
            $infos = "item " . Dumper( $original->unblessed );
92
        } else {
92
        } else {
93
            $infos = Dumper($updated);
93
            $infos = Dumper($updated);
94
        }
94
        }
(-)a/Koha/Item.pm (-3 / +3 lines)
Lines 215-225 sub store { Link Here
215
        }
215
        }
216
    }
216
    }
217
217
218
    my $original = Koha::Items->find( $self->itemnumber );    # $original will be undef if $action eq 'create'
218
    my $result = $self->SUPER::store;
219
    my $result = $self->SUPER::store;
219
    if ( $log_action && C4::Context->preference("CataloguingLog") ) {
220
    if ( $log_action && C4::Context->preference("CataloguingLog") ) {
220
        $action eq 'create'
221
        $action eq 'create'
221
          ? logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" )
222
            ? logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" )
222
          : logaction( "CATALOGUING", "MODIFY", $self->itemnumber, $self );
223
            : logaction( "CATALOGUING", "MODIFY", $self->itemnumber, $self, undef, $original );
223
    }
224
    }
224
    my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
225
    my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
225
    $indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" )
226
    $indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" )
226
- 

Return to bug 37522