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 220-230 sub store { Link Here
220
        }
220
        }
221
    }
221
    }
222
222
223
    my $original = Koha::Items->find( $self->itemnumber );    # $original will be undef if $action eq 'create'
223
    my $result = $self->SUPER::store;
224
    my $result = $self->SUPER::store;
224
    if ( $log_action && C4::Context->preference("CataloguingLog") ) {
225
    if ( $log_action && C4::Context->preference("CataloguingLog") ) {
225
        $action eq 'create'
226
        $action eq 'create'
226
          ? logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" )
227
            ? logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" )
227
          : logaction( "CATALOGUING", "MODIFY", $self->itemnumber, $self );
228
            : logaction( "CATALOGUING", "MODIFY", $self->itemnumber, $self, undef, $original );
228
    }
229
    }
229
    my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
230
    my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
230
    $indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" )
231
    $indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" )
231
- 

Return to bug 37522