Drop $cfg['ShowMysqlInfo'] and $cfg['ShowMysqlVars'] and show info in all cases. Drop $is_superuser condition from showing php info.

This commit is contained in:
Michal Čihař
2005-11-13 21:04:50 +00:00
parent 191b1150c7
commit 72ca7ecf9a
7 changed files with 18 additions and 67 deletions

View File

@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2005-11-13 Michal Čihař <michal@cihar.com>
* 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 <cybot_tm@users.sourceforge.net> 2005-11-13 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* db_details_structure.php: wrong js function call * db_details_structure.php: wrong js function call
* libraries/functions.js * libraries/functions.js

View File

@@ -1149,14 +1149,11 @@ Defaults to FALSE (drop-down). <br />
</dd> </dd>
<dt> <dt>
<b>$cfg['ShowMysqlInfo'] </b>boolean<br />
<b>$cfg['ShowMysqlVars'] </b>boolean<br />
<b>$cfg['ShowPhpInfo'] </b>boolean<br /> <b>$cfg['ShowPhpInfo'] </b>boolean<br />
<b>$cfg['ShowChgPassword'] </b>boolean <b>$cfg['ShowChgPassword'] </b>boolean
</dt> </dt>
<dd> <dd>
Defines whether to display the &quot;MySQL runtime information&quot;, Defines whether to display the &quot;PHP information&quot; and
&quot;MySQL system variables&quot;, &quot;PHP information&quot; and
&quot;Change password &quot; links or not for simple users at the &quot;Change password &quot; links or not for simple users at the
starting main (right) frame. This setting does not check MySQL starting main (right) frame. This setting does not check MySQL
commands entered directly. commands entered directly.

View File

@@ -164,8 +164,6 @@ $cfg['DisplayServersList'] = FALSE; // server choice as links
$cfg['ShowStats'] = TRUE; // allow to display statistics and space usage in $cfg['ShowStats'] = TRUE; // allow to display statistics and space usage in
// the pages about database details and table // the pages about database details and table
// properties // 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['ShowPhpInfo'] = FALSE; // information" and "change password" links for
$cfg['ShowChgPassword'] = FALSE; // simple users or not $cfg['ShowChgPassword'] = FALSE; // simple users or not
$cfg['SuggestDBName'] = TRUE; // suggest a new DB name if possible (false = keep empty) $cfg['SuggestDBName'] = TRUE; // suggest a new DB name if possible (false = keep empty)

View File

@@ -149,19 +149,12 @@ if ( $server > 0 ) {
$common_url_query = PMA_generate_common_url(); $common_url_query = PMA_generate_common_url();
if ($is_superuser) { if ($is_superuser) {
$cfg['ShowMysqlInfo'] = TRUE;
$cfg['ShowMysqlVars'] = TRUE;
$cfg['ShowChgPassword'] = TRUE; $cfg['ShowChgPassword'] = TRUE;
} }
if ($cfg['Server']['auth_type'] == 'config') { if ($cfg['Server']['auth_type'] == 'config') {
$cfg['ShowChgPassword'] = FALSE; $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') {
?> ?>
<table cellpadding="3" cellspacing="0"> <table cellpadding="3" cellspacing="0">
<tr><th class="tblHeaders" colspan="2" xml:lang="en" dir="ltr">MySQL</th></tr> <tr><th class="tblHeaders" colspan="2" xml:lang="en" dir="ltr">MySQL</th></tr>
@@ -173,9 +166,6 @@ if ( $server > 0 ) {
<?php require('./libraries/display_create_database.lib.php'); ?> <?php require('./libraries/display_create_database.lib.php'); ?>
</td> </td>
</tr> </tr>
<?php
if ($cfg['ShowMysqlInfo']) {
?>
<tr> <tr>
<?php <?php
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_status.php?'.$common_url_query.'">','s_status.png',$strMySQLShowStatus,'</a>') : $str_normal_list); echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_status.php?'.$common_url_query.'">','s_status.png',$strMySQLShowStatus,'</a>') : $str_normal_list);
@@ -185,10 +175,6 @@ if ( $server > 0 ) {
</a> </a>
</td> </td>
</tr> </tr>
<?php
} // end if
if ($cfg['ShowMysqlVars']) {
?>
<tr> <?php <tr> <?php
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_variables.php?'.$common_url_query.'">','s_vars.png',$strMySQLShowVars,'</a>') : $str_normal_list); echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_variables.php?'.$common_url_query.'">','s_vars.png',$strMySQLShowVars,'</a>') : $str_normal_list);
?> ?>
@@ -197,9 +183,6 @@ if ( $server > 0 ) {
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES'); ?> <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES'); ?>
</td> </td>
</tr> </tr>
<?php
}
?>
<tr> <?php <tr> <?php
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_processlist.php?'.$common_url_query.'">','s_process.png',$strMySQLShowProcess,'</a>') : $str_normal_list); echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_processlist.php?'.$common_url_query.'">','s_process.png',$strMySQLShowProcess,'</a>') : $str_normal_list);
?> ?>
@@ -327,12 +310,9 @@ if ( $server > 0 ) {
</tr> </tr>
<?php <?php
} // end if } // end if
?>
</table>
<?php
} // end if
} // end of if ($server > 0) } // end of if ($server > 0)
?> ?>
</table>
</td> </td>
<td width="20">&nbsp;</td> <td width="20">&nbsp;</td>
<td valign="top"> <td valign="top">
@@ -493,7 +473,7 @@ if (isset($available_themes_choices) && $available_themes_choices > 1) {
</tr> </tr>
<?php <?php
if ($is_superuser || $cfg['ShowPhpInfo']) { if ($cfg['ShowPhpInfo']) {
?> ?>
<tr><?php <tr><?php
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="phpinfo.php?' . PMA_generate_common_url() . '" target="_blank">','php_sym.png',$strShowPHPInfo,'</a>') : $str_normal_list); echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="phpinfo.php?' . PMA_generate_common_url() . '" target="_blank">','php_sym.png',$strShowPHPInfo,'</a>') : $str_normal_list);

View File

@@ -21,15 +21,6 @@ if (!isset($sub_part)) {
} }
/**
* Prepares links
*/
if ($is_superuser) {
$cfg['ShowMysqlInfo'] = TRUE;
$cfg['ShowMysqlVars'] = TRUE;
}
/** /**
* Displays tab links * Displays tab links
*/ */
@@ -43,16 +34,14 @@ $tabs['sql']['icon'] = 'b_sql.png';
$tabs['sql']['link'] = 'server_sql.php'; $tabs['sql']['link'] = 'server_sql.php';
$tabs['sql']['text'] = $strSQL; $tabs['sql']['text'] = $strSQL;
if ($cfg['ShowMysqlInfo']) {
$tabs['status']['icon'] = 's_status.png'; $tabs['status']['icon'] = 's_status.png';
$tabs['status']['link'] = 'server_status.php'; $tabs['status']['link'] = 'server_status.php';
$tabs['status']['text'] = $strStatus; $tabs['status']['text'] = $strStatus;
}
if ($cfg['ShowMysqlVars']) {
$tabs['vars']['icon'] = 's_vars.png'; $tabs['vars']['icon'] = 's_vars.png';
$tabs['vars']['link'] = 'server_variables.php'; $tabs['vars']['link'] = 'server_variables.php';
$tabs['vars']['text'] = $strServerTabVariables; $tabs['vars']['text'] = $strServerTabVariables;
}
if (PMA_MYSQL_INT_VERSION >= 40100) { if (PMA_MYSQL_INT_VERSION >= 40100) {
$tabs['charset']['icon'] = 's_asci.png'; $tabs['charset']['icon'] = 's_asci.png';
$tabs['charset']['link'] = 'server_collations.php'; $tabs['charset']['link'] = 'server_collations.php';

View File

@@ -32,16 +32,6 @@ echo '<h2>' . "\n"
. '</h2>' . "\n"; . '</h2>' . "\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 * flush status variables if requested
*/ */

View File

@@ -24,15 +24,6 @@ echo '<h2>' . "\n"
. '</h2>' . "\n"; . '</h2>' . "\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 * Sends the queries and buffers the results
*/ */