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

(-)a/C4/Log.pm (-1 / +8 lines)
Lines 121-130 sub logaction { Link Here
121
    my $is_object = blessed($original) && $original->isa('Koha::Object');
121
    my $is_object = blessed($original) && $original->isa('Koha::Object');
122
122
123
    if ( $actionname =~ /^(ADD|CREATE)$/ ) {
123
    if ( $actionname =~ /^(ADD|CREATE)$/ ) {
124
124
        # Log diff against empty hashref for newly created objects
125
        # Log diff against empty hashref for newly created objects
125
        $updated = $is_object ? $original->unblessed : $original;
126
        $updated  = $is_object ? $original->unblessed : $original;
126
        $original = {};
127
        $original = {};
128
    } elsif ( $actionname eq 'DELETE' ) {
129
130
        # Log diff for deleted objects against empty hashref
131
        $original = $is_object ? $original->unblessed : $original;
132
        $updated  = {};
127
    } else {
133
    } else {
134
128
        # Log diff against hashref of pre-modified object if passed in
135
        # Log diff against hashref of pre-modified object if passed in
129
        $original = $is_object ? $original->unblessed : $original;
136
        $original = $is_object ? $original->unblessed : $original;
130
    }
137
    }
(-)a/Koha/Item.pm (-2 / +1 lines)
Lines 283-289 sub delete { Link Here
283
283
284
    $self->_after_item_action_hooks({ action => 'delete' });
284
    $self->_after_item_action_hooks({ action => 'delete' });
285
285
286
    logaction( "CATALOGUING", "DELETE", $self->itemnumber, "item" )
286
    logaction( "CATALOGUING", "DELETE", $self->itemnumber, "item", undef, $self )
287
      if C4::Context->preference("CataloguingLog");
287
      if C4::Context->preference("CataloguingLog");
288
288
289
    Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue(
289
    Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue(
290
- 

Return to bug 37944