summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-01-12 00:08:11 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-01-12 00:08:11 +0100
commit8fda96466449229f502faf490e9d333b3024aec5 (patch)
tree3fd57c6c1fff6b386ff2ff3685b7fbabcb731263 /Bugzilla/Object.pm
parent26cac3c8ee9f03fa897c98d46ea5ea07369c378a (diff)
downloadbugzilla-8fda96466449229f502faf490e9d333b3024aec5.tar.gz
bugzilla-8fda96466449229f502faf490e9d333b3024aec5.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 29a6415b9..422a2ffa5 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -43,7 +43,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
@@ -411,7 +413,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;
@@ -559,7 +561,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;
}