From 806055424c414da586cec794f1f5339d190bd63a Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 10 Oct 2024 15:54:39 +0000 Subject: [PATCH] Bug 35630: Move Data::Dump to AuthorisedValue.pm --- C4/Log.pm | 2 -- Koha/AuthorisedValue.pm | 15 ++++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/C4/Log.pm b/C4/Log.pm index 0909b029b0b..d7ad162c4cb 100644 --- a/C4/Log.pm +++ b/C4/Log.pm @@ -124,8 +124,6 @@ sub logaction { $diff //= encode_json( diff( $original, $updated, noU => 1 ) ) if $original && ref $updated eq 'HASH'; - $infos = Data::Dumper::Dumper( $infos ) if ref $infos; - Koha::ActionLog->new( { timestamp => \'NOW()', diff --git a/Koha/AuthorisedValue.pm b/Koha/AuthorisedValue.pm index c20e9c57fd4..bca214c5d15 100644 --- a/Koha/AuthorisedValue.pm +++ b/Koha/AuthorisedValue.pm @@ -109,12 +109,7 @@ sub store { if ( C4::Context->preference("AuthorizedValuesLog") ) { $self->replace_library_limits($branches); my $action = $new_authorized_value ? 'CREATE' : 'MODIFY'; - - logaction( - 'AUTHORIZEDVALUE', - $action, - $self->id, - { + my $output = { authorised_value => $self->authorised_value, id => $self->id, category => $self->category, @@ -122,7 +117,13 @@ sub store { lib => $self->lib, lib_opac => $self->lib_opac, imageurl => $self->imageurl - }, + }; + my $formatted_output = Data::Dumper::Dumper($object); + logaction( + 'AUTHORIZEDVALUE', + $action, + $self->id, + $formatted_output, undef, $original ); -- 2.39.2