diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/BugMail.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Install/Localconfig.pm | 14 | ||||
-rw-r--r-- | Bugzilla/Mailer.pm | 8 | ||||
-rw-r--r-- | Bugzilla/Send/Sendmail.pm | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index defe7c84f..915405a0e 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -421,7 +421,7 @@ sub sendMail { bugmailtype => $bugmailtype, }; - if (Bugzilla->params->{'use_mailer_queue'}) { + if (Bugzilla->get_param_with_override('use_mailer_queue')) { enqueue($vars); } else { MessageToMTA(_generate_bugmail($vars)); diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index ba8e8dc57..de2219f16 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -43,7 +43,7 @@ our @EXPORT_OK = qw( # might want to change this for upstream use constant ENV_PREFIX => 'BMO_'; -use constant PARAM_OVERRIDE => qw( shadowdb shadowdbhost shadowdbport shadowdbsock ); +use constant PARAM_OVERRIDE => qw( use_mailer_queue mail_delivery_method shadowdb shadowdbhost shadowdbport shadowdbsock ); sub _sensible_group { return '' if ON_WINDOWS; @@ -135,12 +135,12 @@ use constant LOCALCONFIG_VARS => ( { name => 'param_override', default => { - memcached_servers => undef, - memcached_namespace => undef, - shadowdb => undef, - shadowdbhost => undef, - shadowdbport => undef, - shadowdbsock => undef, + use_mailer_queue => undef, + mail_delivery_method => undef, + shadowdb => undef, + shadowdbhost => undef, + shadowdbport => undef, + shadowdbsock => undef, }, }, { diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 6e46d1862..e245a05e0 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -37,10 +37,10 @@ use Bugzilla::Version qw(vers_cmp); sub MessageToMTA { my ($msg, $send_now) = (@_); - my $method = Bugzilla->params->{'mail_delivery_method'}; + my $method = Bugzilla->get_param_with_override('mail_delivery_method'); return if $method eq 'None'; - if (Bugzilla->params->{'use_mailer_queue'} and !$send_now) { + if (Bugzilla->get_param_with_override('use_mailer_queue') and !$send_now) { Bugzilla->job_queue->insert('send_mail', { msg => $msg }); return; } @@ -66,7 +66,7 @@ sub MessageToMTA { } # Ensure that we are not sending emails too quickly to recipients. - if (Bugzilla->params->{use_mailer_queue} + if (Bugzilla->get_param_with_override('use_mailer_queue') && (EMAIL_LIMIT_PER_MINUTE || EMAIL_LIMIT_PER_HOUR)) { $dbh->do( @@ -226,7 +226,7 @@ sub MessageToMTA { } # insert into email_rates - if (Bugzilla->params->{use_mailer_queue} + if (Bugzilla->get_param_with_override('use_mailer_queue') && (EMAIL_LIMIT_PER_MINUTE || EMAIL_LIMIT_PER_HOUR)) { $dbh->do( diff --git a/Bugzilla/Send/Sendmail.pm b/Bugzilla/Send/Sendmail.pm index 71c1f67ce..81c2190e5 100644 --- a/Bugzilla/Send/Sendmail.pm +++ b/Bugzilla/Send/Sendmail.pm @@ -37,7 +37,7 @@ sub send { unless (close $pipe) { return failure "error when closing pipe to $mailer: $!" if $!; my ($error_message, $is_transient) = _map_exitcode($? >> 8); - if (Bugzilla->params->{'use_mailer_queue'}) { + if (Bugzilla->get_param_with_override('use_mailer_queue')) { # Return success for errors which are fatal so Bugzilla knows to # remove them from the queue if ($is_transient) { |