From 1c1c8c15d62b29a87c8f04aded86406828c2ecf8 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sun, 21 May 2006 01:12:06 +0000 Subject: Bug 338365: Bugzilla::BugMail calls Param() outside of any function Patch By Max Kanat-Alexander r=ghendricks, a=justdave --- Bugzilla/BugMail.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Bugzilla') 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 () { @@ -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: id . "$sitespec>"; -- cgit v1.2.3-24-g4f1b