From 125f9ee83842cd6ad6cfcbcbfcaa951ec0396733 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Saad-Dupuy Date: Mon, 7 Oct 2013 12:30:40 +0200 Subject: Added support for custom ssl port --- inc/poche/Tools.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 8eb988f4..6f2bc6e7 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -41,10 +41,14 @@ class Tools $https = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) || (isset($_SERVER["SERVER_PORT"]) - && $_SERVER["SERVER_PORT"] == '443'); // HTTPS detection. + && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. + || (isset($_SERVER["SERVER_PORT"]) && isset($SSL_PORT) //Custom HTTPS port detection + && $_SERVER["SERVER_PORT"] == $SSL_PORT); + $serverport = (!isset($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == '80' || ($https && $_SERVER["SERVER_PORT"] == '443') + || ($https && $_SERVER["SERVER_PORT"]==$SSL_PORT) //Custom HTTPS port detection ? '' : ':' . $_SERVER["SERVER_PORT"]); $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); @@ -243,4 +247,4 @@ class Tools $lang = explode('.', $userlanguage); return str_replace('_', '-', $lang[0]); } -} \ No newline at end of file +} -- cgit v1.2.3