From 6bf8b8330ee37fb7ac949a01d64c582e34df1d24 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 7 Dec 2005 12:57:07 +0000 Subject: [PATCH] - use style classes - format numbers - display only global variables that differs from local/session - use PMA_DBI_fetch_result() - PMA_NO_VARIABLES_IMPORT --- server_variables.php | 109 ++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/server_variables.php b/server_variables.php index 1d938af8c..ad24ec786 100644 --- a/server_variables.php +++ b/server_variables.php @@ -2,6 +2,9 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +if ( ! defined( 'PMA_NO_VARIABLES_IMPORT' ) ) { + define( 'PMA_NO_VARIABLES_IMPORT', true ); +} require_once('./libraries/common.lib.php'); /** @@ -29,80 +32,78 @@ echo '

' . "\n" * Sends the queries and buffers the results */ if (PMA_MYSQL_INT_VERSION >= 40003) { - $res = PMA_DBI_query('SHOW SESSION VARIABLES;'); - while ($row = PMA_DBI_fetch_row($res)) { - $serverVars[$row[0]] = $row[1]; - } - PMA_DBI_free_result($res); - unset($res, $row); - $res = PMA_DBI_query('SHOW GLOBAL VARIABLES;'); - while ($row = PMA_DBI_fetch_row($res)) { - $serverVarsGlobal[$row[0]] = $row[1]; - } - PMA_DBI_free_result($res); - unset($res, $row); + $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1); + $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1); } else { - $res = PMA_DBI_query('SHOW VARIABLES;'); - while ($row = PMA_DBI_fetch_row($res)) { - $serverVars[$row[0]] = $row[1]; - } - PMA_DBI_free_result($res); - unset($res, $row); + $serverVars = PMA_DBI_fetch_result('SHOW VARIABLES;', 0, 1); } -unset($res); -unset($row); /** * Displays the page */ ?> - - - +
  
+ + + ' . "\n" - . ' ' . "\n"; ?> - + + + + $value) { - if ($GLOBALS['cfg']['BrowsePointerEnable'] == TRUE) { - $on_mouse = ' onmouseover="this.style.backgroundColor=\'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\';"' - . ' onmouseout="this.style.backgroundColor=\'' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '\';"'; - } else { - $on_mouse = ''; - } -?> - > - - -= 40003) { -?> - - + + + + = 40003 + && $serverVarsGlobal[$name] !== $value ) { + ?> + + + + + + + +
 '; if (PMA_MYSQL_INT_VERSION >= 40003) { - echo $strSessionValue . '  ' . $strGlobalValue; + echo $strSessionValue . ' / ' . $strGlobalValue; } else { echo $strValue; } -echo ' 
- - - - - -
+
()