From 5885077fbbc97add0d077898c06726ef3106eee9 Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 6 Jan 2014 15:01:10 +1100 Subject: [PATCH] Bug 11473 - add 'biblio' and 'item' to cataloguing logging info This patch adds the words 'biblio' and 'item' to the 'info' of the cataloguing logs which were missing them (such as biblio delete, biblio mod, item mod, upload cover image). This patch also adds 'authority' for authority mod. _TEST PLAN_ Before applying: 1) Create/view mods for items, biblios, and authorities. 2) Create/view biblio deletion 3) Create/view upload cover image log 4) Note that none of these contain the words 'biblio','item',or 'authority' in their "Info" columns. Apply patch. 5) Repeat steps 1-3 6) Note that the new logs contain 'biblio','item', and 'authority' in their "Info" column, while the past ones don't. 7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item' appear in their "Object" column for the new logs Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- C4/AuthoritiesMarc.pm | 2 +- C4/Biblio.pm | 4 ++-- C4/Items.pm | 2 +- tools/upload-cover-image.pl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index a22190b9fb..f7eb1226aa 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -739,7 +739,7 @@ sub ModAuthority { "VALUES (?,?)"; $dbh->do($sqlinsert,undef,($authid,0)); } - logaction( "AUTHORITIES", "MODIFY", $authid, "BEFORE=>" . $oldrecord->as_formatted ) if C4::Context->preference("AuthoritiesLog"); + logaction( "AUTHORITIES", "MODIFY", $authid, "authority BEFORE=>" . $oldrecord->as_formatted ) if C4::Context->preference("AuthoritiesLog"); return $authid; } diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 71e936626d..dc40d6835c 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -316,7 +316,7 @@ sub ModBiblio { if ( C4::Context->preference("CataloguingLog") ) { my $newrecord = GetMarcBiblio($biblionumber); - logaction( "CATALOGUING", "MODIFY", $biblionumber, "BEFORE=>" . $newrecord->as_formatted ); + logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $newrecord->as_formatted ); } # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to @@ -470,7 +470,7 @@ sub DelBiblio { # from being generated by _koha_delete_biblioitems $error = _koha_delete_biblio( $dbh, $biblionumber ); - logaction( "CATALOGUING", "DELETE", $biblionumber, "" ) if C4::Context->preference("CataloguingLog"); + logaction( "CATALOGUING", "DELETE", $biblionumber, "biblio" ) if C4::Context->preference("CataloguingLog"); return; } diff --git a/C4/Items.pm b/C4/Items.pm index 2b83ffc648..5680db70c6 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -583,7 +583,7 @@ sub ModItem { # item status is possible ModZebra( $biblionumber, "specialUpdate", "biblioserver" ); - logaction("CATALOGUING", "MODIFY", $itemnumber, Dumper($item)) if C4::Context->preference("CataloguingLog"); + logaction("CATALOGUING", "MODIFY", $itemnumber, "item ".Dumper($item)) if C4::Context->preference("CataloguingLog"); } =head2 ModItemTransfer diff --git a/tools/upload-cover-image.pl b/tools/upload-cover-image.pl index b85a81a73c..8ca419c682 100755 --- a/tools/upload-cover-image.pl +++ b/tools/upload-cover-image.pl @@ -151,7 +151,7 @@ if ($fileID) { $filename =~ s/^\s+//; $filename =~ s/\s+$//; if (C4::Context->preference("CataloguingLog")) { - logaction('CATALOGUING', 'MODIFY', $biblionumber, "cover image: $filename"); + logaction('CATALOGUING', 'MODIFY', $biblionumber, "biblio cover image: $filename"); } my $srcimage = GD::Image->new("$dir/$filename"); if ( defined $srcimage ) { -- 2.39.5