diff options
author | mkanat%bugzilla.org <> | 2006-05-21 01:12:06 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-05-21 01:12:06 +0000 |
commit | 1c1c8c15d62b29a87c8f04aded86406828c2ecf8 (patch) | |
tree | 9cc6ecca392073ea0b9d447a4bc401251eeb4b2f /Bugzilla | |
parent | 7a4bbc15e2a73382bc9eaf1b168a620bbd16db97 (diff) | |
download | bugs-1c1c8c15d62b29a87c8f04aded86406828c2ecf8.tar bugs-1c1c8c15d62b29a87c8f04aded86406828c2ecf8.tar.gz bugs-1c1c8c15d62b29a87c8f04aded86406828c2ecf8.tar.bz2 bugs-1c1c8c15d62b29a87c8f04aded86406828c2ecf8.tar.xz bugs-1c1c8c15d62b29a87c8f04aded86406828c2ecf8.zip |
Bug 338365: Bugzilla::BugMail calls Param() outside of any function
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/BugMail.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 3919c0ec6..49cfce4d0 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -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>"; |