Commit 1c1c8c15 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 338365: Bugzilla::BugMail calls Param() outside of any function

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=justdave
parent 7a4bbc15
......@@ -64,13 +64,6 @@ my %rel_names = (REL_ASSIGNEE , "AssignedTo",
my %nomail;
my $sitespec = '@'.Param('urlbase');
$sitespec =~ s/:\/\//\./; # Make the protocol look like part of the domain
$sitespec =~ s/^([^:\/]+):(\d+)/$1/; # Remove a port number, to relocate
if ($2) {
$sitespec = "-$2$sitespec"; # Put the port number back in, before the '@'
}
# This is run when we load the package
if (open(NOMAIL, '<', "$datadir/nomail")) {
while (<NOMAIL>) {
......@@ -651,6 +644,13 @@ sub sendMail {
$substs{"space"} = " ";
$substs{"changer"} = $values{'changer'};
$substs{"changername"} = $values{'changername'};
my $sitespec = '@' . Param('urlbase');
$sitespec =~ s/:\/\//\./; # Make the protocol look like part of the domain
$sitespec =~ s/^([^:\/]+):(\d+)/$1/; # Remove a port number, to relocate
if ($2) {
$sitespec = "-$2$sitespec"; # Put the port number back in, before the '@'
}
if ($isnew) {
$substs{'threadingmarker'} = "Message-ID: <bug-$id-" .
$user->id . "$sitespec>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment