Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b5f6cf7a76
@ -101,6 +101,17 @@ Basic settings
|
||||
|
||||
You can set this parameter to ``true`` to stop this message from appearing.
|
||||
|
||||
.. config:option:: $cfg['ReservedWordDisableWarning']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
This warning is displayed on the Structure page of a table if one or more
|
||||
column names match with words which are MySQL reserved.
|
||||
|
||||
If you want to turn off this warning, you can set it to ``true`` and
|
||||
warning will not longer be displayed
|
||||
|
||||
.. config:option:: $cfg['TranslationWarningThreshold']
|
||||
|
||||
:type: integer
|
||||
|
||||
@ -69,6 +69,13 @@ $cfg['McryptDisableWarning'] = false;
|
||||
*/
|
||||
$cfg['ServerLibraryDifference_DisableWarning'] = false;
|
||||
|
||||
/**
|
||||
* Disable the default warning about MySQL reserved words in column names
|
||||
*
|
||||
* @global boolean $cfg['ReservedWordDisableWarning']
|
||||
*/
|
||||
$cfg['ReservedWordDisableWarning'] = false;
|
||||
|
||||
/**
|
||||
* Show warning about incomplete translations on certain threshold.
|
||||
*
|
||||
|
||||
@ -333,6 +333,8 @@ $strConfigPmaNoRelation_DisableWarning_desc = __('Disable the default warning th
|
||||
$strConfigPmaNoRelation_DisableWarning_name = __('Missing phpMyAdmin configuration storage tables');
|
||||
$strConfigServerLibraryDifference_DisableWarning_desc = __('Disable the default warning that is displayed if a difference between the MySQL library and server is detected');
|
||||
$strConfigServerLibraryDifference_DisableWarning_name = __('Server/library difference warning');
|
||||
$strConfigReservedWordDisableWarning_desc = __('Disable the default warning that is displayed on the Structure page if column names in a table are reserved MySQL words');
|
||||
$strConfigReservedWordDisableWarning_name = __('MySQL reserved word warning');
|
||||
$strConfigPropertiesIconic_desc = __('Use only icons, only text or both');
|
||||
$strConfigPropertiesIconic_name = __('Iconic table operations');
|
||||
$strConfigProtectBinary_desc = __('Disallow BLOB and BINARY columns from editing');
|
||||
|
||||
@ -52,7 +52,8 @@ $forms['Features']['Warnings'] = array(
|
||||
'ServerLibraryDifference_DisableWarning',
|
||||
'PmaNoRelation_DisableWarning',
|
||||
'SuhosinDisableWarning',
|
||||
'McryptDisableWarning');
|
||||
'McryptDisableWarning',
|
||||
'ReservedWordDisableWarning');
|
||||
// settings from this form are treated specially,
|
||||
// see prefs_forms.php and user_preferences.lib.php
|
||||
$forms['Features']['Developer'] = array(
|
||||
|
||||
14
sql.php
14
sql.php
@ -1213,20 +1213,6 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
|
||||
echo '</fieldset>' . "\n";
|
||||
}
|
||||
|
||||
|
||||
// Check column names for MySQL reserved words
|
||||
$pma_table = new PMA_Table($table, $db);
|
||||
$columns = $pma_table->getReservedColumnNames();
|
||||
if (! empty($columns)) {
|
||||
foreach ($columns as $column) {
|
||||
$msg = PMA_message::notice(
|
||||
__('The column name \'%s\' is a MySQL reserved keyword.')
|
||||
);
|
||||
$msg->addParam($column);
|
||||
$msg->display();
|
||||
}
|
||||
}
|
||||
|
||||
// Displays the results in a table
|
||||
if (empty($disp_mode)) {
|
||||
// see the "PMA_setDisplayMode()" function in
|
||||
|
||||
@ -134,15 +134,17 @@ $url_params['goto'] = 'tbl_structure.php';
|
||||
$url_params['back'] = 'tbl_structure.php';
|
||||
|
||||
// Check column names for MySQL reserved words
|
||||
$pma_table = new PMA_Table($table, $db);
|
||||
$columns = $pma_table->getReservedColumnNames();
|
||||
if (! empty($columns)) {
|
||||
foreach ($columns as $column) {
|
||||
$msg = PMA_message::notice(
|
||||
__('The column name \'%s\' is a MySQL reserved keyword.')
|
||||
);
|
||||
$msg->addParam($column);
|
||||
$response->addHTML($msg);
|
||||
if ($cfg['ReservedWordDisableWarning'] === false) {
|
||||
$pma_table = new PMA_Table($table, $db);
|
||||
$columns = $pma_table->getReservedColumnNames();
|
||||
if (! empty($columns)) {
|
||||
foreach ($columns as $column) {
|
||||
$msg = PMA_message::notice(
|
||||
__('The column name \'%s\' is a MySQL reserved keyword.')
|
||||
);
|
||||
$msg->addParam($column);
|
||||
$response->addHTML($msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user