diff options
author | Byron Jones <bjones@mozilla.com> | 2013-02-20 09:47:17 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-02-20 09:47:17 +0100 |
commit | 0fd221c6a2623521b5a81a56bcb32a4402bf0f31 (patch) | |
tree | 40bd2737984bcbd87b9bc5807606317b32e77a67 /extensions/LimitedEmail | |
parent | 39e464daa0068f00fc1ae47a4dfbe952403b9d1d (diff) | |
download | bugzilla-0fd221c6a2623521b5a81a56bcb32a4402bf0f31.tar.gz bugzilla-0fd221c6a2623521b5a81a56bcb32a4402bf0f31.tar.xz |
Fix the path to the LimitedEmail log file
Diffstat (limited to 'extensions/LimitedEmail')
-rw-r--r-- | extensions/LimitedEmail/Config.pm | 2 | ||||
-rw-r--r-- | extensions/LimitedEmail/Extension.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/extensions/LimitedEmail/Config.pm b/extensions/LimitedEmail/Config.pm index 026398edb..ea05f363c 100644 --- a/extensions/LimitedEmail/Config.pm +++ b/extensions/LimitedEmail/Config.pm @@ -19,6 +19,4 @@ use constant FILTERS => [ qr/^reed\@reedloden\.com$/i, ]; -use constant MAIL_LOG => 'data/mail.log'; - __PACKAGE__->NAME; diff --git a/extensions/LimitedEmail/Extension.pm b/extensions/LimitedEmail/Extension.pm index f2020a6cc..35cc83567 100644 --- a/extensions/LimitedEmail/Extension.pm +++ b/extensions/LimitedEmail/Extension.pm @@ -14,6 +14,7 @@ our $VERSION = '2'; use FileHandle; use Date::Format; use Encode qw(encode_utf8); +use Bugzilla::Constants qw(bz_locations); sub mailer_before_send { my ($self, $args) = @_; @@ -27,7 +28,8 @@ sub mailer_before_send { $header->header_set(to => ''); } - my $fh = FileHandle->new('>>' . Bugzilla::Extension::LimitedEmail::MAIL_LOG); + my $log_filename = bz_locations->{'datadir'} . '/mail.log'; + my $fh = FileHandle->new(">>$log_filename"); if ($fh) { print $fh encode_utf8(sprintf( "[%s] %s%s %s : %s\n", |