From a9a04c3b6473db8ca1f3c8645e9c1112f0e0644c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 27 Apr 2006 22:02:57 +0000 Subject: [PATCH] Possibility to hide creating of database from main (RFE #1370100). --- ChangeLog | 4 ++++ Documentation.html | 9 +++++---- libraries/config.default.php | 5 +++-- main.php | 12 +++++++----- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfbdae0d5..508232362 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-04-28 Michal Čihař + * Documentation.html, main.php, libraries/config.default.php: Possibility + to hide creating of database from main (RFE #1370100). + 2006-04-27 Sebastian Mendel * db_printview.php: fixed bug 'no tables found', refactored * tbl_change.php, tbl_indexes.php: removed table formating, done in css diff --git a/Documentation.html b/Documentation.html index 0d43f1665..2fb8c1d24 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1146,12 +1146,13 @@ ALTER TABLE `pma_column_comments` date, MySQL doesn't return such information for Berkeley DB tables.
$cfg[ShowPhpInfo] boolean
- $cfg[ShowChgPassword] boolean + $cfg[ShowChgPassword] boolean
+ $cfg[ShowCreateDb] boolean
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.

+ "Change password " links and form for creating database or + not for simple users at the starting main (right) frame. This setting + does not check MySQL commands entered directly.

Please note that to block the usage of phpinfo() in scripts, you have to put this in your php.ini: diff --git a/libraries/config.default.php b/libraries/config.default.php index abd92154d..704de77f4 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -170,8 +170,9 @@ $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['ShowPhpInfo'] = FALSE; // information" and "change password" links for -$cfg['ShowChgPassword'] = FALSE; // simple users or not +$cfg['ShowPhpInfo'] = FALSE; // show php info link +$cfg['ShowChgPassword'] = FALSE; // show change password link +$cfg['ShowCreateDb'] = TRUE; // show create database form $cfg['SuggestDBName'] = TRUE; // suggest a new DB name if possible (false = keep empty) // In browse mode... diff --git a/main.php b/main.php index bb88bef7e..2c2aa5d77 100644 --- a/main.php +++ b/main.php @@ -145,9 +145,11 @@ if ( $server > 0 ) { . ' ' . "\n"; } - echo '
  • '; - require('./libraries/display_create_database.lib.php'); - echo '
  • ' . "\n"; + if ($cfg['ShowCreateDb']) { + echo '
  • '; + require('./libraries/display_create_database.lib.php'); + echo '
  • ' . "\n"; + } PMA_printListItem( $strMySQLShowStatus, 'li_mysql_status', './server_status.php?' . $common_url_query ); @@ -373,8 +375,8 @@ if (defined('PMA_MYSQL_INT_VERSION') && PMA_MYSQL_INT_VERSION < 32332) { * @param string $name displayed text * @param string $id id, used for css styles * @param string $url make item as link with $url as target - * @param string $mysql_help_page display a link to MySQL's manual - * @param string $target special target for $url + * @param string $mysql_help_page display a link to MySQL's manual + * @param string $target special target for $url */ function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = null, $target = null) {