If $cfgPmaAbsoluteUri is empty the script now tries to guess it
This commit is contained in:
@@ -5,6 +5,13 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-02-26 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* main.php3, lines 11-15; libraries/grab_globals.lib.php3;
|
||||||
|
libraries/auth/cookie.auth.lib.php3: fixed bug #522887 - Using
|
||||||
|
SSL -> cookies are unsecure.
|
||||||
|
* libraries/common.lib.php3, lines 146-164: if $cfgPmaAbsoluteUri is empty
|
||||||
|
the script now tries to guess it.
|
||||||
|
|
||||||
2002-02-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2002-02-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* lang/japanese-*: updated thanks to Yukihiro Kawada aka "luc"
|
* lang/japanese-*: updated thanks to Yukihiro Kawada aka "luc"
|
||||||
<kawada at den.fujifilm.co.jp>.
|
<kawada at den.fujifilm.co.jp>.
|
||||||
@@ -12,8 +19,6 @@ $Source$
|
|||||||
to Purodha B Blissenbach <purodha at sourceforge.net>.
|
to Purodha B Blissenbach <purodha at sourceforge.net>.
|
||||||
* libraries/auth/*: patch #522671 - Add charset when asking for auth,
|
* libraries/auth/*: patch #522671 - Add charset when asking for auth,
|
||||||
thanks to "nijel".
|
thanks to "nijel".
|
||||||
* main.php3, lines 11-15; libraries/auth/cookie.auth.lib.php3: fixed bug
|
|
||||||
#522887 Using SSL -> cookies are unsecure.
|
|
||||||
|
|
||||||
2002-02-24 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2002-02-24 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* lang/german.inc.php3: updated thanks to Alexander M. Turek.
|
* lang/german.inc.php3: updated thanks to Alexander M. Turek.
|
||||||
|
@@ -143,9 +143,28 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
|
|||||||
$cfgLeftFrameLight = TRUE;
|
$cfgLeftFrameLight = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds a trailing slash et the end of the phpMyAdmin uri if it does not
|
// If $cfgPmaAbsoluteUri is empty, tries to guess it
|
||||||
// exist
|
if (empty($cfgPmaAbsoluteUri)) {
|
||||||
if ($cfgPmaAbsoluteUri != '' && substr($cfgPmaAbsoluteUri, -1) != '/') {
|
if (!empty($_SERVER)) {
|
||||||
|
$HTTPS = (isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : '');
|
||||||
|
$SERVER_NAME = (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '');
|
||||||
|
$SERVER_PORT = (isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : '');
|
||||||
|
$SCRIPT_NAME = (isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : '');
|
||||||
|
} else if (!empty($HTTP_SERVER_VARS)) {
|
||||||
|
$HTTPS = (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : '');
|
||||||
|
$SERVER_NAME = (isset($HTTP_SERVER_VARS['SERVER_NAME']) ? $HTTP_SERVER_VARS['SERVER_NAME'] : '');
|
||||||
|
$SERVER_PORT = (isset($HTTP_SERVER_VARS['SERVER_PORT']) ? $HTTP_SERVER_VARS['SERVER_PORT'] : '');
|
||||||
|
$SCRIPT_NAME = (isset($HTTP_SERVER_VARS['SCRIPT_NAME']) ? $HTTP_SERVER_VARS['SCRIPT_NAME'] : '');
|
||||||
|
} // end if... else if
|
||||||
|
if (!empty($SERVER_NAME) && !empty($SCRIPT_NAME)) {
|
||||||
|
$cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
||||||
|
. $SERVER_NAME . (!empty($SERVER_PORT) ? ':' . $SERVER_PORT : '')
|
||||||
|
. substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')+1);
|
||||||
|
} // end if
|
||||||
|
} // end if
|
||||||
|
// Else adds a trailing slash et the end of the phpMyAdmin uri if it does
|
||||||
|
// not exist
|
||||||
|
else if (substr($cfgPmaAbsoluteUri, -1) != '/') {
|
||||||
$cfgPmaAbsoluteUri .= '/';
|
$cfgPmaAbsoluteUri .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user