From 334bead74bc9c5e819f14946726eaad40986d636 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sat, 16 Dec 2017 13:17:05 -0600 Subject: Bug 1403777 - Migrate urlbase from params to localconfig --- Bugzilla/Mailer.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Bugzilla/Mailer.pm') 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) { -- cgit v1.2.3-24-g4f1b