From 72ca7ecf9a9ddc3e2b4e7b7aaa3d724fd03b134b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Sun, 13 Nov 2005 21:04:50 +0000 Subject: [PATCH] Drop $cfg['ShowMysqlInfo'] and $cfg['ShowMysqlVars'] and show info in all cases. Drop $is_superuser condition from showing php info. --- ChangeLog | 6 ++++++ Documentation.html | 5 +---- config.default.php | 2 -- main.php | 26 +++----------------------- server_links.inc.php | 27 ++++++++------------------- server_status.php | 10 ---------- server_variables.php | 9 --------- 7 files changed, 18 insertions(+), 67 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82e02375f..f0d5e69ae 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-11-13 Michal Čihař + * Documentation.html, config.default.php, main.php, server_links.inc.php, + server_variables.php, server_status.php: Drop $cfg['ShowMysqlInfo'] and + $cfg['ShowMysqlVars'] and show info in all cases. Drop $is_superuser + condition from showing php info. + 2005-11-13 Sebastian Mendel * db_details_structure.php: wrong js function call * libraries/functions.js diff --git a/Documentation.html b/Documentation.html index b2ff00cc2..8d8ef8c72 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1149,14 +1149,11 @@ Defaults to FALSE (drop-down).
- $cfg['ShowMysqlInfo'] boolean
- $cfg['ShowMysqlVars'] boolean
$cfg['ShowPhpInfo'] boolean
$cfg['ShowChgPassword'] boolean
- Defines whether to display the "MySQL runtime information", - "MySQL system variables", "PHP information" and + Defines whether to display the "PHP information" and "Change password " links or not for simple users at the starting main (right) frame. This setting does not check MySQL commands entered directly. diff --git a/config.default.php b/config.default.php index 491bdc8cf..8b33f5c08 100644 --- a/config.default.php +++ b/config.default.php @@ -164,8 +164,6 @@ $cfg['DisplayServersList'] = FALSE; // server choice as links $cfg['ShowStats'] = TRUE; // allow to display statistics and space usage in // the pages about database details and table // properties -$cfg['ShowMysqlInfo'] = FALSE; // whether to display the "MySQL runtime -$cfg['ShowMysqlVars'] = FALSE; // information", "MySQL system variables", "PHP $cfg['ShowPhpInfo'] = FALSE; // information" and "change password" links for $cfg['ShowChgPassword'] = FALSE; // simple users or not $cfg['SuggestDBName'] = TRUE; // suggest a new DB name if possible (false = keep empty) diff --git a/main.php b/main.php index 53bafbf96..47a39478a 100644 --- a/main.php +++ b/main.php @@ -149,20 +149,13 @@ if ( $server > 0 ) { $common_url_query = PMA_generate_common_url(); if ($is_superuser) { - $cfg['ShowMysqlInfo'] = TRUE; - $cfg['ShowMysqlVars'] = TRUE; $cfg['ShowChgPassword'] = TRUE; } if ($cfg['Server']['auth_type'] == 'config') { $cfg['ShowChgPassword'] = FALSE; } - // loic1: Displays the MySQL column only if at least one feature has to be - // displayed - if ($is_superuser || $is_create_db_priv || $is_process_priv || $is_reload_priv - || $cfg['ShowMysqlInfo'] || $cfg['ShowMysqlVars'] || $cfg['ShowChgPassword'] - || $cfg['Server']['auth_type'] != 'config') { - ?> + ?> @@ -173,9 +166,6 @@ if ( $server > 0 ) { - ','s_status.png',$strMySQLShowStatus,'') : $str_normal_list); @@ -185,10 +175,6 @@ if ( $server > 0 ) { - ','s_vars.png',$strMySQLShowVars,'') : $str_normal_list); ?> @@ -197,9 +183,6 @@ if ( $server > 0 ) { - ','s_process.png',$strMySQLShowProcess,'') : $str_normal_list); ?> @@ -327,12 +310,9 @@ if ( $server > 0 ) { -
MySQL
- 0) ?> +   @@ -493,7 +473,7 @@ if (isset($available_themes_choices) && $available_themes_choices > 1) { ','php_sym.png',$strShowPHPInfo,'') : $str_normal_list); diff --git a/server_links.inc.php b/server_links.inc.php index b1359c7a0..34e5c29ee 100644 --- a/server_links.inc.php +++ b/server_links.inc.php @@ -21,15 +21,6 @@ if (!isset($sub_part)) { } -/** - * Prepares links - */ -if ($is_superuser) { - $cfg['ShowMysqlInfo'] = TRUE; - $cfg['ShowMysqlVars'] = TRUE; -} - - /** * Displays tab links */ @@ -43,16 +34,14 @@ $tabs['sql']['icon'] = 'b_sql.png'; $tabs['sql']['link'] = 'server_sql.php'; $tabs['sql']['text'] = $strSQL; -if ($cfg['ShowMysqlInfo']) { - $tabs['status']['icon'] = 's_status.png'; - $tabs['status']['link'] = 'server_status.php'; - $tabs['status']['text'] = $strStatus; -} -if ($cfg['ShowMysqlVars']) { - $tabs['vars']['icon'] = 's_vars.png'; - $tabs['vars']['link'] = 'server_variables.php'; - $tabs['vars']['text'] = $strServerTabVariables; -} +$tabs['status']['icon'] = 's_status.png'; +$tabs['status']['link'] = 'server_status.php'; +$tabs['status']['text'] = $strStatus; + +$tabs['vars']['icon'] = 's_vars.png'; +$tabs['vars']['link'] = 'server_variables.php'; +$tabs['vars']['text'] = $strServerTabVariables; + if (PMA_MYSQL_INT_VERSION >= 40100) { $tabs['charset']['icon'] = 's_asci.png'; $tabs['charset']['link'] = 'server_collations.php'; diff --git a/server_status.php b/server_status.php index 459c30c30..ce0667ce4 100644 --- a/server_status.php +++ b/server_status.php @@ -32,16 +32,6 @@ echo '

' . "\n" . '

' . "\n"; -/** - * Checks if the user is allowed to do what he tries to... - */ -if (!$is_superuser && !$cfg['ShowMysqlInfo']) { - echo $strNoPrivileges; - require_once('./footer.inc.php'); - exit; -} - - /** * flush status variables if requested */ diff --git a/server_variables.php b/server_variables.php index b91f83f93..b5c2c96b6 100644 --- a/server_variables.php +++ b/server_variables.php @@ -24,15 +24,6 @@ echo '

' . "\n" . '

' . "\n"; -/** - * Checks if the user is allowed to do what he tries to... - */ -if (!$is_superuser && !$cfg['ShowMysqlVars']) { - echo $strNoPrivileges; - require_once('./footer.inc.php'); -} - - /** * Sends the queries and buffers the results */