diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-01-25 07:21:40 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-01-25 07:23:09 -0600 |
commit | 5e498cfe7e2ac0b8c585bdfaec1a98f2f548e16c (patch) | |
tree | f4bea5ae52f78252f8951569ec804730e1d7b072 /src | |
parent | 0919644d360888918ae728dd19728d1da332856f (diff) | |
download | pfsense-5e498cfe7e2ac0b8c585bdfaec1a98f2f548e16c.zip pfsense-5e498cfe7e2ac0b8c585bdfaec1a98f2f548e16c.tar.gz |
Fixes the other uses of SERVER_NAME in tree.
The SERVER_NAME variable is not available anymore, use HTTP_HOST instead.
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/functions.inc | 2 | ||||
-rw-r--r-- | src/etc/inc/smtp.inc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/inc/functions.inc b/src/etc/inc/functions.inc index c5636fa..026d7fb 100644 --- a/src/etc/inc/functions.inc +++ b/src/etc/inc/functions.inc @@ -86,7 +86,7 @@ if (!function_exists("pfSenseHeader")) { if ($_SERVER['SERVER_PORT'] == "443" && $protocol == "https") { $port = ""; } - $complete_url = "{$protocol}://{$_SERVER['SERVER_NAME']}{$port}/{$text}"; + $complete_url = "{$protocol}://{$_SERVER['HTTP_HOST']}{$port}/{$text}"; echo "\ndocument.location.href = '{$complete_url}';\n"; } else { header("Location: $text"); diff --git a/src/etc/inc/smtp.inc b/src/etc/inc/smtp.inc index de5522c..48872d8 100644 --- a/src/etc/inc/smtp.inc +++ b/src/etc/inc/smtp.inc @@ -1243,7 +1243,7 @@ class smtp_class if($this->debug) $this->OutputDebug("Connected to SMTP server \"".$domain."\"."); if(!strcmp($localhost=$this->localhost,"") - && !strcmp($localhost=getenv("SERVER_NAME"),"") + && !strcmp($localhost=getenv("HTTP_HOST"),"") && !strcmp($localhost=getenv("HOST"),"")) $localhost="localhost"; $success=0; @@ -1889,4 +1889,4 @@ class smtp_class */ -?>
\ No newline at end of file +?> |