PHP3 compatibility

This commit is contained in:
Alexander M. Turek
2002-07-11 16:08:32 +00:00
parent ec375cd11d
commit f8fc7bd715
2 changed files with 5 additions and 2 deletions

View File

@@ -5,8 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-07-11 Alexander M. Turek <rabus@users.sourceforge.net>
* libraries/common.lib.php3: PHP3 compatibility.
2002-07-11 Robin Johnson <robbat2@users.sourceforge.net> 2002-07-11 Robin Johnson <robbat2@users.sourceforge.net>
* libraries/common.inc.php3: Fix for case where HTTP_HOST contains * libraries/common.lib.php3: Fix for case where HTTP_HOST contains
the port already, as adding HTTP_PORT is wrong then. the port already, as adding HTTP_PORT is wrong then.
2002-07-10 Marc Delisle <lem9@users.sourceforge.net> 2002-07-10 Marc Delisle <lem9@users.sourceforge.net>

View File

@@ -522,7 +522,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
// work anyway, but display a big warning on the main.php3 // work anyway, but display a big warning on the main.php3
// page. // page.
if (empty($cfg['PmaAbsoluteUri'])) { if (empty($cfg['PmaAbsoluteUri'])) {
$port_in_HTTP_HOST = strpos($HTTP_SERVER_VARS['HTTP_HOST'],':') !== FALSE; $port_in_HTTP_HOST = strpos($HTTP_SERVER_VARS['HTTP_HOST'], ':') > 0;
$cfg['PmaAbsoluteUri'] = (!empty($HTTP_SERVER_VARS['HTTPS']) ? 'https' : 'http') . '://' $cfg['PmaAbsoluteUri'] = (!empty($HTTP_SERVER_VARS['HTTPS']) ? 'https' : 'http') . '://'
. $HTTP_SERVER_VARS['HTTP_HOST'] . $HTTP_SERVER_VARS['HTTP_HOST']
. ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '') . ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '')