Add support for hiding server information.
This commit is contained in:
@@ -9,6 +9,8 @@ $HeadURL$
|
|||||||
* Documentation.html: Fix HTML errors.
|
* Documentation.html: Fix HTML errors.
|
||||||
* libraries/sqlparser.data.php, libraries/sqlparser.lib.php: Add support
|
* libraries/sqlparser.data.php, libraries/sqlparser.lib.php: Add support
|
||||||
for ON DUPLICATE KEY (bug #1576226).
|
for ON DUPLICATE KEY (bug #1576226).
|
||||||
|
* Documentation.html, main.php, libraries/config.default.php: Add support
|
||||||
|
for hiding server information.
|
||||||
|
|
||||||
2006-10-16 Michal Čihař <michal@cihar.com>
|
2006-10-16 Michal Čihař <michal@cihar.com>
|
||||||
* left.php, navigation.php, scripts/setup.php, js/querywindow.js,
|
* left.php, navigation.php, scripts/setup.php, js/querywindow.js,
|
||||||
|
@@ -1203,6 +1203,12 @@ ALTER TABLE `pma_column_comments`
|
|||||||
Note that statistics requires at least MySQL 3.23.3 and that, at this
|
Note that statistics requires at least MySQL 3.23.3 and that, at this
|
||||||
date, MySQL doesn't return such information for Berkeley DB tables.</dd>
|
date, MySQL doesn't return such information for Berkeley DB tables.</dd>
|
||||||
|
|
||||||
|
<dt><span id="cfg_ShowServerInfo">$cfg['ShowServerInfo'] </span>boolean</dt>
|
||||||
|
<dd>Defines whether to display detailed server information on main page.
|
||||||
|
You can additionally hide more information by using
|
||||||
|
<tt><a href="#cfg_Servers_verbose">$cfg['Servers'][$i]['verbose']</a></tt>.
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt><span id="cfg_ShowPhpInfo">$cfg['ShowPhpInfo'] </span>boolean<br />
|
<dt><span id="cfg_ShowPhpInfo">$cfg['ShowPhpInfo'] </span>boolean<br />
|
||||||
<span id="cfg_ShowChgPassword">$cfg['ShowChgPassword'] </span>boolean<br />
|
<span id="cfg_ShowChgPassword">$cfg['ShowChgPassword'] </span>boolean<br />
|
||||||
<span id="cfg_ShowCreateDb">$cfg['ShowCreateDb'] </span>boolean
|
<span id="cfg_ShowCreateDb">$cfg['ShowCreateDb'] </span>boolean
|
||||||
|
@@ -175,6 +175,7 @@ $cfg['ShowStats'] = TRUE; // allow to display statistics and space
|
|||||||
// the pages about database details and table
|
// the pages about database details and table
|
||||||
// properties
|
// properties
|
||||||
$cfg['ShowPhpInfo'] = FALSE; // show php info link
|
$cfg['ShowPhpInfo'] = FALSE; // show php info link
|
||||||
|
$cfg['ShowServerInfo'] = TRUE; // show MySQL server information
|
||||||
$cfg['ShowChgPassword'] = FALSE; // show change password link
|
$cfg['ShowChgPassword'] = FALSE; // show change password link
|
||||||
$cfg['ShowCreateDb'] = TRUE; // show create database form
|
$cfg['ShowCreateDb'] = TRUE; // show create database form
|
||||||
$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)
|
||||||
|
29
main.php
29
main.php
@@ -59,12 +59,16 @@ if ($server > 0) {
|
|||||||
// if a value is set
|
// if a value is set
|
||||||
$server_info = '';
|
$server_info = '';
|
||||||
if (!empty($cfg['Server']['verbose'])) {
|
if (!empty($cfg['Server']['verbose'])) {
|
||||||
$server_info .= $cfg['Server']['verbose'];
|
$server_info .= htmlspecialchars($cfg['Server']['verbose']);
|
||||||
$server_info .= ' (';
|
if ($GLOBALS['cfg']['ShowServerInfo']) {
|
||||||
|
$server_info .= ' (';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) {
|
||||||
|
$server_info .= PMA_DBI_get_host_info();
|
||||||
}
|
}
|
||||||
$server_info .= PMA_DBI_get_host_info();
|
|
||||||
|
|
||||||
if (!empty($cfg['Server']['verbose'])) {
|
if (!empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) {
|
||||||
$server_info .= ')';
|
$server_info .= ')';
|
||||||
}
|
}
|
||||||
// loic1: skip this because it's not a so good idea to display sockets
|
// loic1: skip this because it's not a so good idea to display sockets
|
||||||
@@ -89,12 +93,17 @@ if ($server > 0) {
|
|||||||
if ($server > 0) {
|
if ($server > 0) {
|
||||||
echo '<ul>' . "\n";
|
echo '<ul>' . "\n";
|
||||||
|
|
||||||
PMA_printListItem($strServerVersion . ': ' . PMA_MYSQL_STR_VERSION, 'li_server_info');
|
if ($GLOBALS['cfg']['ShowServerInfo']) {
|
||||||
PMA_printListItem($strProtocolVersion . ': ' . PMA_DBI_get_proto_info(),
|
PMA_printListItem($strServerVersion . ': ' . PMA_MYSQL_STR_VERSION, 'li_server_info');
|
||||||
'li_mysql_proto');
|
PMA_printListItem($strProtocolVersion . ': ' . PMA_DBI_get_proto_info(),
|
||||||
PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info');
|
'li_mysql_proto');
|
||||||
PMA_printListItem($strUser . ': ' . htmlspecialchars($mysql_cur_user_and_host),
|
PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info');
|
||||||
'li_user_info');
|
PMA_printListItem($strUser . ': ' . htmlspecialchars($mysql_cur_user_and_host),
|
||||||
|
'li_user_info');
|
||||||
|
} else {
|
||||||
|
PMA_printListItem($strServerVersion . ': ' . PMA_MYSQL_STR_VERSION, 'li_server_info');
|
||||||
|
PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info');
|
||||||
|
}
|
||||||
|
|
||||||
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding && PMA_MYSQL_INT_VERSION < 40100) {
|
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding && PMA_MYSQL_INT_VERSION < 40100) {
|
||||||
echo '<li id="li_select_mysql_charset">';
|
echo '<li id="li_select_mysql_charset">';
|
||||||
|
Reference in New Issue
Block a user