summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Mailer.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-12-16 20:17:05 +0100
committerGitHub <noreply@github.com>2017-12-16 20:17:05 +0100
commit334bead74bc9c5e819f14946726eaad40986d636 (patch)
treee7ecf8d4eba2e6a046da8a9dc8828f35b75c7428 /Bugzilla/Mailer.pm
parent49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff)
downloadbugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz
bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r--Bugzilla/Mailer.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index 768f68607..6e46d1862 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -104,10 +104,7 @@ sub MessageToMTA {
# We add this header to uniquely identify all email that we
# send as coming from this Bugzilla installation.
#
- # We don't use correct_urlbase, because we want this URL to
- # *always* be the same for this Bugzilla, in every email,
- # even if the admin changes the "ssl_redirect" parameter some day.
- $email->header_set('X-Bugzilla-URL', Bugzilla->params->{'urlbase'});
+ $email->header_set('X-Bugzilla-URL', Bugzilla->localconfig->{urlbase});
# We add this header to mark the mail as "auto-generated" and
# thus to hopefully avoid auto replies.
@@ -156,7 +153,7 @@ sub MessageToMTA {
else {
# Sendmail will automatically append our hostname to the From
# address, but other mailers won't.
- my $urlbase = Bugzilla->params->{'urlbase'};
+ my $urlbase = Bugzilla->localconfig->{urlbase};
$urlbase =~ m|//([^:/]+)[:/]?|;
$hostname = $1;
$from .= "\@$hostname" if $from !~ /@/;
@@ -248,7 +245,7 @@ sub build_thread_marker {
$user_id = Bugzilla->user->id;
}
- my $sitespec = '@' . Bugzilla->params->{'urlbase'};
+ my $sitespec = '@' . Bugzilla->localconfig->{urlbase};
$sitespec =~ s/:\/\//\./; # Make the protocol look like part of the domain
$sitespec =~ s/^([^:\/]+):(\d+)/$1/; # Remove a port number, to relocate
if ($2) {