From 04f78e57c35ea4fac99fb58530e1721c1a3f3ce3 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 3 Mar 2011 16:54:01 -0500 Subject: [PATCH] bug 5783: follow-up - fix logging of modifications Fix so that modifying an authority record is not logged as both an ADD and a MODIFY. Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- C4/AuthoritiesMarc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 5d1378cb88..f3cc948d89 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); } -- 2.39.5