[-] Installer : ignore port when creating the sender e-mail address #PSCFV-3756
// Improved profiling tool git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17004 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+3
-1
@@ -175,9 +175,11 @@ class ToolsCore
|
||||
* @param boolean $entities
|
||||
* @return string host
|
||||
*/
|
||||
public static function getHttpHost($http = false, $entities = false)
|
||||
public static function getHttpHost($http = false, $entities = false, $ignore_port = false)
|
||||
{
|
||||
$host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']);
|
||||
if ($ignore_port && $pos = strpos($host, ':'))
|
||||
$host = substr($host, 0, $pos);
|
||||
if ($entities)
|
||||
$host = htmlspecialchars($host, ENT_COMPAT, 'UTF-8');
|
||||
if ($http)
|
||||
|
||||
Reference in New Issue
Block a user