From: Jens Frank Date: Fri, 29 Apr 2005 07:41:50 +0000 (+0000) Subject: Bug 1980 - Port 443 added to https / SSL URLs X-Git-Tag: 1.5.0alpha1~78 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=7d8aea28412045f1b834d3176d2942e1670db50e;p=lhc%2Fweb%2Fwiklou.git Bug 1980 - Port 443 added to https / SSL URLs --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a7706ce795..859f5497d4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -43,7 +43,11 @@ if( isset( $_SERVER['SERVER_NAME'] ) ) { $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; $wgServer = $wgProto.'://' . $wgServerName; -if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) { +# If the port is a non-standard one, add it to the URL +if( isset( $_SERVER['SERVER_PORT'] ) + && ( ( $wgProto == 'http' && $_SERVER['SERVER_PORT'] != 80 ) + || ( $wgProto == 'https' && $_SERVER['SERVER_PORT'] != 443 ) ) ) { + $wgServer .= ":" . $_SERVER['SERVER_PORT']; } unset($wgProto);