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

(-)a/C4/Log.pm (-4 / +5 lines)
Lines 26-31 use warnings; Link Here
26
26
27
use Data::Dumper qw( Dumper );
27
use Data::Dumper qw( Dumper );
28
use JSON qw( to_json );
28
use JSON qw( to_json );
29
use Scalar::Util qw( blessed );
29
30
30
use C4::Context;
31
use C4::Context;
31
use Koha::Logger;
32
use Koha::Logger;
Lines 77-89 sub logaction { Link Here
77
    $usernumber ||= 0;
78
    $usernumber ||= 0;
78
    $interface //= C4::Context->interface;
79
    $interface //= C4::Context->interface;
79
80
80
    if ( ref($infos) && ref($infos) !~ /HASH|ARRAY/ && $infos->isa('Koha::Object') ) {
81
    if( blessed($infos) && $infos->isa('Koha::Object') ) {
81
        $infos = $infos->get_from_storage if $infos->in_storage;
82
        $infos = $infos->get_from_storage if $infos->in_storage;
82
        local $Data::Dumper::Sortkeys = 1;
83
        local $Data::Dumper::Sortkeys = 1;
83
        $infos = Dumper( $infos->unblessed );
84
84
85
        if ( $infos->isa('Koha::Item') && $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) {
85
        if ( $infos->isa('Koha::Item') && $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) {
86
            $infos = "item " . $infos;
86
            $infos = "item " . Dumper( $infos->unblessed );
87
        } else {
88
            $infos = Dumper( $infos->unblessed );
87
        }
89
        }
88
    }
90
    }
89
91
90
- 

Return to bug 28692