Fix URI detection in case REQUEST_URI contains full URI (patch #1044123).
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-10-25 Michal Čihař <michal@cihar.com>
|
||||
* libraries/common.lib.php: Fix URI detection in case REQUEST_URI contains
|
||||
full URI (patch #1044123).
|
||||
|
||||
2004-10-24 Michael Keck <mkkeck@users.sourceforge.net>
|
||||
* config.inc.php, themes/*/layout.inc.php:
|
||||
bug #1050666 - Query window too small darkblue/orange theme
|
||||
|
@@ -1009,6 +1009,11 @@ if ($is_minimum_common == FALSE) {
|
||||
if (isset(${$SERVER_ARRAY}['HTTP_SCHEME'])) {
|
||||
$HTTP_SCHEME = ${$SERVER_ARRAY}['HTTP_SCHEME'];
|
||||
}
|
||||
|
||||
// in some cases $REQUEST_URI contains full URI including protocol and host, so just use it:
|
||||
if (isset($REQUEST_URI) && preg_match('@https?://@', $REQUEST_URI)) {
|
||||
$cfg['PmaAbsoluteUri'] = substr($REQUEST_URI, 0, strrpos($REQUEST_URI, '/') + 1);
|
||||
} else {
|
||||
if (!empty($HTTP_SCHEME)) {
|
||||
$cfg['PmaAbsoluteUri'] = $HTTP_SCHEME . '://';
|
||||
} else {
|
||||
@@ -1033,6 +1038,7 @@ if ($is_minimum_common == FALSE) {
|
||||
} else {
|
||||
$cfg['PmaAbsoluteUri'] .= 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.
|
||||
|
Reference in New Issue
Block a user