summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-01-12 00:05:36 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-01-12 00:05:36 +0100
commitbdbf87750c1769584e3e672c9ae93c71ad3de273 (patch)
tree6c1f9a8c00fb210e02a15369479b11fea79c324c /Bugzilla/Object.pm
parentfe2a998bfe82513f5ab5a8dc9d373d57c9c68ec5 (diff)
downloadbugzilla-bdbf87750c1769584e3e672c9ae93c71ad3de273.tar.gz
bugzilla-bdbf87750c1769584e3e672c9ae93c71ad3de273.tar.xz
Bug 715902: Do not log personal common activities in audit_log
r=dkl a=LpSolit
Diffstat (limited to 'Bugzilla/Object.pm')
-rw-r--r--Bugzilla/Object.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm
index 19297e143..1b0af509d 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -29,7 +29,9 @@ use constant VALIDATOR_DEPENDENCIES => {};
# XXX At some point, this will be joined with FIELD_MAP.
use constant REQUIRED_FIELD_MAP => {};
use constant EXTRA_REQUIRED_FIELDS => ();
+use constant AUDIT_CREATES => 1;
use constant AUDIT_UPDATES => 1;
+use constant AUDIT_REMOVES => 1;
# This allows the JSON-RPC interface to return Bugzilla::Object instances
# as though they were hashes. In the future, this may be modified to return
@@ -397,7 +399,7 @@ sub remove_from_db {
my $id_field = $self->ID_FIELD;
my $dbh = Bugzilla->dbh;
$dbh->bz_start_transaction();
- $self->audit_log(AUDIT_REMOVE);
+ $self->audit_log(AUDIT_REMOVE) if $self->AUDIT_REMOVES;
$dbh->do("DELETE FROM $table WHERE $id_field = ?", undef, $self->id);
$dbh->bz_commit_transaction();
undef $self;
@@ -545,7 +547,7 @@ sub insert_create_data {
Bugzilla::Hook::process('object_end_of_create', { class => $class,
object => $object });
- $object->audit_log(AUDIT_CREATE);
+ $object->audit_log(AUDIT_CREATE) if $object->AUDIT_CREATES;
return $object;
}