Add some more fixes for wrongly typed $cfg['PmaAbsoluteUri'].
This commit is contained in:
@@ -12,6 +12,8 @@ $Source$
|
|||||||
* lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis).
|
* lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis).
|
||||||
* lang/persian-utf-8.inc.php3: Regenerated, was somehow broken.
|
* lang/persian-utf-8.inc.php3: Regenerated, was somehow broken.
|
||||||
* lang/sort_lang.sh: Ignores non file parameter.
|
* lang/sort_lang.sh: Ignores non file parameter.
|
||||||
|
* libraries/common.lib.php3: Add some more fixes for wrongly typed
|
||||||
|
$cfg['PmaAbsoluteUri'].
|
||||||
|
|
||||||
2003-10-15 Marc Delisle <lem9@users.sourceforge.net>
|
2003-10-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lang/russian-windows-1251: wrong charset (bug 823939)
|
* lang/russian-windows-1251: wrong charset (bug 823939)
|
||||||
|
@@ -693,11 +693,34 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
if ($cfg['PmaAbsoluteUri_DisableWarning'] == FALSE) {
|
if ($cfg['PmaAbsoluteUri_DisableWarning'] == FALSE) {
|
||||||
$display_pmaAbsoluteUri_warning = 1;
|
$display_pmaAbsoluteUri_warning = 1;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
// Adds a trailing slash et the end of the phpMyAdmin uri if it does not
|
// The URI is specified, however users do often specify this
|
||||||
// exist
|
// wrongly, so we try to fix this.
|
||||||
else if (substr($cfg['PmaAbsoluteUri'], -1) != '/') {
|
|
||||||
$cfg['PmaAbsoluteUri'] .= '/';
|
// Adds a trailing slash et the end of the phpMyAdmin uri if it
|
||||||
|
// does not exist.
|
||||||
|
if (substr($cfg['PmaAbsoluteUri'], -1) != '/') {
|
||||||
|
$cfg['PmaAbsoluteUri'] .= '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
// If URI doesn't start with http:// or https://, we will add
|
||||||
|
// this.
|
||||||
|
if (substr($cfg['PmaAbsoluteUri'], 0, 7) != 'http://' && substr($cfg['PmaAbsoluteUri'], 0, 8) != 'https://') {
|
||||||
|
if (!empty($_SERVER)) {
|
||||||
|
$SERVER_ARRAY = '_SERVER';
|
||||||
|
} else if (!empty($HTTP_SERVER_VARS)) {
|
||||||
|
$SERVER_ARRAY = 'HTTP_SERVER_VARS';
|
||||||
|
} else {
|
||||||
|
$SERVER_ARRAY = 'GLOBALS';
|
||||||
|
} // end if
|
||||||
|
if (isset(${$SERVER_ARRAY}['HTTPS'])) {
|
||||||
|
$HTTPS = ${$SERVER_ARRAY}['HTTPS'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$cfg['PmaAbsoluteUri'] = ((!empty($HTTPS) && strtolower($HTTPS) != 'off') ? 'https' : 'http') . ':'
|
||||||
|
. (substr($cfg['PmaAbsoluteUri'], 0, 2) == '//' ? '' : '//')
|
||||||
|
. $cfg['PmaAbsoluteUri'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user