[-] 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:
dMetzger
2012-08-27 06:47:41 +00:00
parent ef4a9f83ba
commit 4cabe99f19
3 changed files with 47 additions and 33 deletions
+3 -1
View File
@@ -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)