fix warning with undefined cfgPmaAbsoluteUri
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-03-14 Steve Alberty <alberty@neptunelabs.de>
|
||||||
|
* main.php3: fix warning with undefined $cfgPmaAbsoluteUri
|
||||||
|
|
||||||
2002-03-14 Marc Delisle <lem9@users.sourceforge.net>
|
2002-03-14 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/common.lib.php3, PMA_MYSQL_INT_VERSION is not yet defined
|
* libraries/common.lib.php3, PMA_MYSQL_INT_VERSION is not yet defined
|
||||||
before the connection
|
before the connection
|
||||||
|
14
main.php3
14
main.php3
@@ -10,8 +10,18 @@ require('./libraries/common.lib.php3');
|
|||||||
// Puts the language to use in a cookie that will expire in 30 days
|
// Puts the language to use in a cookie that will expire in 30 days
|
||||||
if (!isset($pma_uri_parts)) {
|
if (!isset($pma_uri_parts)) {
|
||||||
$pma_uri_parts = parse_url($cfgPmaAbsoluteUri);
|
$pma_uri_parts = parse_url($cfgPmaAbsoluteUri);
|
||||||
$cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/'));
|
if (isset($pma_uri_parts['path'])) {
|
||||||
$is_https = ($pma_uri_parts['scheme'] == 'https') ? 1 : 0;
|
$cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$cookie_path = '';
|
||||||
|
}
|
||||||
|
if (isset($pma_uri_parts['scheme'])) {
|
||||||
|
$is_https = ($pma_uri_parts['scheme'] == 'https') ? 1 : 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$is_https = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setcookie('lang', $lang, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
setcookie('lang', $lang, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||||
// Defines the "item" image depending on text direction
|
// Defines the "item" image depending on text direction
|
||||||
|
Reference in New Issue
Block a user