From b6925193d6357ee45c797a99e0563ffb2a82e392 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 21 Apr 2012 08:21:28 -0400 Subject: [PATCH] Remove SuggestDBName configuration directive --- ChangeLog | 1 + Documentation.html | 4 ---- libraries/check_user_privileges.lib.php | 14 ++++++-------- libraries/config.default.php | 7 ------- libraries/config/messages.inc.php | 2 -- libraries/config/setup.forms.php | 4 +--- libraries/config/user_preferences.forms.php | 4 +--- 7 files changed, 9 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index d92ec3d56c..82b9f6e872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ phpMyAdmin - ChangeLog - bug #3510196 [core] Improved redirecting with ForceSSL option + rfe #3518852 [edit] edit blob but not other binary, new option $cfg['ProtectBinary'] = 'noblob' + Hide language select box if there are no locales installed ++ Removed some directives: verbose_check, SuggestDBName, LightTabs 3.5.1.0 (not yet released) - bug #3510784 [edit] Limit clause ignored when sort order is remembered diff --git a/Documentation.html b/Documentation.html index 8449158781..62bc346671 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1647,10 +1647,6 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE hard coded password value in the configuration file, end users can't be allowed to change their passwords. -
$cfg['SuggestDBName'] boolean
-
Defines whether to suggest a database name on the - "Create Database" form or to keep the textfield empty.
-
$cfg['ShowDbStructureCreation'] boolean
Defines whether the database structure page (tables list) has a "Creation" column that displays when each table was created.
diff --git a/libraries/check_user_privileges.lib.php b/libraries/check_user_privileges.lib.php index 9e1f8146f7..e81be59b80 100644 --- a/libraries/check_user_privileges.lib.php +++ b/libraries/check_user_privileges.lib.php @@ -109,14 +109,12 @@ function PMA_analyseShowGrant() || (! PMA_DBI_try_query('USE ' . preg_replace('/' . $re1 . '(%|_)/', '\\1\\3', $dbname_to_test)) && substr(PMA_DBI_getError(), 1, 4) != 1044) ) { - if ($GLOBALS['cfg']['SuggestDBName']) { - /** - * Do not handle the underscore wildcard - * (this case must be rare anyway) - */ - $GLOBALS['db_to_create'] = preg_replace('/' . $re0 . '%/', '\\1...', $show_grants_dbname); - $GLOBALS['db_to_create'] = preg_replace('/' . $re1 . '(%|_)/', '\\1\\3', $GLOBALS['db_to_create']); - } + /** + * Do not handle the underscore wildcard + * (this case must be rare anyway) + */ + $GLOBALS['db_to_create'] = preg_replace('/' . $re0 . '%/', '\\1...', $show_grants_dbname); + $GLOBALS['db_to_create'] = preg_replace('/' . $re1 . '(%|_)/', '\\1\\3', $GLOBALS['db_to_create']); $GLOBALS['is_create_db_priv'] = true; /** diff --git a/libraries/config.default.php b/libraries/config.default.php index 930708b7e1..a429c7b941 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -942,13 +942,6 @@ $cfg['ShowChgPassword'] = true; */ $cfg['ShowCreateDb'] = true; -/** - * suggest a new DB name if possible (false = keep empty) - * - * @global boolean $cfg['SuggestDBName'] - */ -$cfg['SuggestDBName'] = true; - /******************************************************************************* * Database structure diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index dbaa7bd2e3..669b84e46e 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -499,8 +499,6 @@ $strConfigSQLValidator_use_desc = __('[strong]Warning:[/strong] requires PHP SOA $strConfigSQLValidator_use_name = __('Enable SQL Validator'); $strConfigSQLValidator_username_desc = __('If you have a custom username, specify it here (defaults to [kbd]anonymous[/kbd])'); $strConfigSQLValidator_username_name = __('Username'); -$strConfigSuggestDBName_desc = __('Suggest a database name on the "Create Database" form (if possible) or keep the text field empty'); -$strConfigSuggestDBName_name = __('Suggest new database name'); $strConfigSuhosinDisableWarning_desc = __('A warning is displayed on the main page if Suhosin is detected'); $strConfigSuhosinDisableWarning_name = __('Suhosin warning'); $strConfigTextareaCols_desc = __('Textarea size (columns) in edit mode, this value will be emphasized for SQL query textareas (*2) and for query window (*1.25)'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 34b2de9a22..4b3465b041 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -186,9 +186,7 @@ $forms['Left_frame']['Left_tables'] = array( 'ShowTooltip', 'ShowTooltipAliasTB'); $forms['Main_frame']['Startup'] = array( - 'ShowCreateDb' => ':group', - 'SuggestDBName', - ':group:end', + 'ShowCreateDb', 'ShowStats', 'ShowServerInfo', 'ShowPhpInfo', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 179b5aea3e..7a86fda5a0 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -97,9 +97,7 @@ $forms['Left_frame']['Left_tables'] = array( 'ShowTooltip', 'ShowTooltipAliasTB'); $forms['Main_frame']['Startup'] = array( - 'ShowCreateDb' => ':group', - 'SuggestDBName', - ':group:end', + 'ShowCreateDb', 'ShowStats', 'ShowServerInfo'); $forms['Main_frame']['DbStructure'] = array(