use PMA_getenv('PHP_SELF')

This commit is contained in:
Marc Delisle
2007-03-02 15:16:15 +00:00
parent 1f7afb504f
commit ef6536f141
2 changed files with 12 additions and 6 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog
$Id$
$HeadURL$
2007-03-02 Marc Delisle <lem9@users.sourceforge.net>
* server_status.php: use PMA_getenv('PHP_SELF'), thanks to Sebastian
2007-03-02 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* libraries/common.lib.php: bug #1672379 Call to undefined function PMA_removeCookie()

View File

@@ -262,8 +262,11 @@ $sections = array(
// variable or section name => (name => url)
$links = array();
// because of PMA_NO_VARIABLES_IMPORT, the $PHP_SELF globalized by
// grab_globals is not available here when register_globals = Off
// and in some situations, $_SERVER['PHP_SELF'] is not defined
$links['table'][$strFlushTables]
= $_SERVER['PHP_SELF'] . '?flush=TABLES&amp;' . PMA_generate_common_url();
= PMA_getenv('PHP_SELF') . '?flush=TABLES&amp;' . PMA_generate_common_url();
$links['table'][$strShowOpenTables]
= 'sql.php?sql_query=' . urlencode('SHOW OPEN TABLES') .
'&amp;goto=server_status.php&amp;' . PMA_generate_common_url();
@@ -278,7 +281,7 @@ $links['repl']['MySQL - ' . $strDocu]
= $cfg['MySQLManualBase'] . '/replication.html';
$links['qcache'][$strFlushQueryCache]
= $_SERVER['PHP_SELF'] . '?flush=' . urlencode('QUERY CACHE') . '&amp;' .
= PMA_getenv('PHP_SELF') . '?flush=' . urlencode('QUERY CACHE') . '&amp;' .
PMA_generate_common_url();
$links['qcache']['MySQL - ' . $strDocu]
= $cfg['MySQLManualBase'] . '/query-cache.html';
@@ -337,10 +340,10 @@ $hour_factor = 3600 / $server_status['Uptime'];
?>
<div id="statuslinks">
<a href="<?php echo
$_SERVER['PHP_SELF'] . '?' . PMA_generate_common_url(); ?>"
PMA_getenv('PHP_SELF') . '?' . PMA_generate_common_url(); ?>"
><?php echo $strRefresh; ?></a>
<a href="<?php echo
$_SERVER['PHP_SELF'] . '?flush=STATUS&amp;' . PMA_generate_common_url(); ?>"
PMA_getenv('PHP_SELF') . '?flush=STATUS&amp;' . PMA_generate_common_url(); ?>"
><?php echo $strShowStatusReset; ?></a>
<a href="<?php echo
$cfg['MySQLManualBase']; ?>/server-status-variables.html"
@@ -359,7 +362,7 @@ echo sprintf($strServerStatusUptime,
<?php
foreach ($sections as $section_name => $section) {
if (! empty($section['vars']) && ! empty($section['title'])) {
echo '<a href="' . $_SERVER['PHP_SELF'] . '?' .
echo '<a href="' . PMA_getenv('PHP_SELF') . '?' .
PMA_generate_common_url() . '#' . $section_name . '">' .
$section['title'] . '</a>' . "\n";
}
@@ -578,7 +581,7 @@ foreach ($sections as $section_name => $section) {
<table class="data" id="serverstatussection<?php echo $section_name; ?>">
<caption class="tblHeaders">
<a class="top"
href="<?php echo $_SERVER['PHP_SELF'] . '?' .
href="<?php echo PMA_getenv('PHP_SELF') . '?' .
PMA_generate_common_url() . '#serverstatus'; ?>"
name="<?php echo $section_name; ?>"><?php echo $strPos1; ?>
<?php echo