[Koha-patches] [PATCH 2/3] [SIGNED-OFF] bug 5783: follow-up - fix logging of modifications
Galen Charlton
gmcharlt at gmail.com
Thu Mar 3 22:54:01 CET 2011
Fix so that modifying an authority record is not logged
as both an ADD and a MODIFY.
Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
C4/AuthoritiesMarc.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
index 5d1378c..f3cc948 100644
--- a/C4/AuthoritiesMarc.pm
+++ b/C4/AuthoritiesMarc.pm
@@ -701,8 +701,8 @@ sub AddAuthority {
my $sth=$dbh->prepare("insert into auth_header (authid,datecreated,authtypecode,marc,marcxml) values (?,now(),?,?,?)");
$sth->execute($authid,$authtypecode,$record->as_usmarc,$record->as_xml_record($format));
$sth->finish;
+ logaction( "AUTHORITIES", "ADD", $authid, "authority" ) if C4::Context->preference("AuthoritiesLog");
}
- logaction( "AUTHORITIES", "ADD", $authid, "authority" ) if C4::Context->preference("AuthoritiesLog");
ModZebra($authid,'specialUpdate',"authorityserver",$oldRecord,$record);
return ($authid);
}
--
1.7.2.3
More information about the Koha-patches
mailing list