Remove the ports in baseURL if it is the standard port (80 for http, 443 for https)

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1577 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-07-27 09:29:02 +00:00
parent af990df2f3
commit 3a35351199

View File

@@ -31,11 +31,11 @@ class route
return $this->baseURL; return $this->baseURL;
if (!isset ($_SERVER["SERVER_PORT"])) if (!isset ($_SERVER["SERVER_PORT"]))
$_SERVER["SERVER_PORT"] = 80; $_SERVER["SERVER_PORT"] = "80";
$port = ":".$_SERVER["SERVER_PORT"]; $port = ":".$_SERVER["SERVER_PORT"];
if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 80) if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "80")
$port = ""; $port = "";
if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 443) if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "443")
$port = ""; $port = "";
if (isset ($_SERVER["SCRIPT_NAME"])) if (isset ($_SERVER["SCRIPT_NAME"]))
@@ -84,11 +84,11 @@ class route
else else
$url = "http:"; $url = "http:";
if (!isset ($_SERVER["SERVER_PORT"])) if (!isset ($_SERVER["SERVER_PORT"]))
$_SERVER["SERVER_PORT"] = 80; $_SERVER["SERVER_PORT"] = "80";
$port = ":".$_SERVER["SERVER_PORT"]; $port = ":".$_SERVER["SERVER_PORT"];
if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 80) if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "80")
$port = ""; $port = "";
if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 443) if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "443")
$port = ""; $port = "";
if (isset ($_SERVER["SERVER_NAME"])) if (isset ($_SERVER["SERVER_NAME"]))