diff --git a/ChangeLog b/ChangeLog index 20ef72059..5e62dc5b6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-07-11 Robin Johnson + * libraries/common.inc.php3: Fix for case where HTTP_HOST contains + the port already, as adding HTTP_PORT is wrong then. + 2002-07-10 Marc Delisle * libraries/charset_conversion.lib.php3: wrong function called, thanks to Michal Cihar diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 8abdece4c..32e9f7239 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -522,9 +522,10 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} // work anyway, but display a big warning on the main.php3 // page. if (empty($cfg['PmaAbsoluteUri'])) { + $port_in_HTTP_HOST = strpos($HTTP_SERVER_VARS['HTTP_HOST'],':') !== FALSE; $cfg['PmaAbsoluteUri'] = (!empty($HTTP_SERVER_VARS['HTTPS']) ? 'https' : 'http') . '://' . $HTTP_SERVER_VARS['HTTP_HOST'] - . (!empty($HTTP_SERVER_VARS['SERVER_PORT']) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '') + . ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '') . substr($PHP_SELF, 0, strrpos($PHP_SELF, '/') + 1); // We display the warning by default, but not if it is disabled thru // via the $cfg['PmaAbsoluteUri_DisableWarning'] variable.