Merge pull request #13020 from nijel/mysql-warning

Remove ServerLibraryDifference_DisableWarning setting
This commit is contained in:
Michal Čihař 2017-02-21 09:12:15 +01:00 committed by GitHub
commit bb762f8bb5
6 changed files with 4 additions and 58 deletions

View File

@ -108,6 +108,10 @@ Basic settings
:type: boolean
:default: false
.. deprecated:: 4.7.0
This setting was removed as the warning has been removed as well.
A warning is displayed on the main page if there is a difference
between the MySQL library and server version.

View File

@ -574,48 +574,6 @@ if ($server > 0) {
} // end if
}
/**
* Warning about different MySQL library and server version
* (a difference on the third digit does not count).
* If someday there is a constant that we can check about mysqlnd,
* we can use it instead of strpos().
* If no default server is set, $GLOBALS['dbi'] is not defined yet.
* We also do not warn if MariaDB is detected, as it has its own version
* numbering.
*/
if (isset($GLOBALS['dbi'])
&& $cfg['ServerLibraryDifference_DisableWarning'] == false
) {
$_client_info = $GLOBALS['dbi']->getClientInfo();
if ($server > 0
&& mb_strpos($_client_info, 'mysqlnd') === false
&& mb_strpos(PMA_MYSQL_STR_VERSION, 'MariaDB') === false
&& substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(
PMA_MYSQL_INT_VERSION, 0, 3
)
) {
trigger_error(
Sanitize::sanitize(
sprintf(
__(
'Your PHP MySQL library version %s differs from your ' .
'MySQL server version %s. This may cause unpredictable ' .
'behavior.'
),
$_client_info,
substr(
PMA_MYSQL_STR_VERSION,
0,
strpos(PMA_MYSQL_STR_VERSION . '-', '-')
)
)
),
E_USER_NOTICE
);
}
unset($_client_info);
}
/**
* Warning about Suhosin only if its simulation mode is not enabled
*/

View File

@ -61,14 +61,6 @@ $cfg['SuhosinDisableWarning'] = false;
*/
$cfg['LoginCookieValidityDisableWarning'] = false;
/**
* Disable the default warning that is displayed if a difference between
* the MySQL library and server is detected.
*
* @global boolean $cfg['['ServerLibraryDifference_DisableWarning']']
*/
$cfg['ServerLibraryDifference_DisableWarning'] = false;
/**
* Disable the default warning about MySQL reserved words in column names
*

View File

@ -568,12 +568,6 @@ $strConfigPmaNoRelation_DisableWarning_desc = __(
);
$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.'

View File

@ -117,7 +117,6 @@ $forms['Features']['Page_titles'] = array(
'TitleDatabase',
'TitleServer');
$forms['Features']['Warnings'] = array(
'ServerLibraryDifference_DisableWarning',
'PmaNoRelation_DisableWarning',
'SuhosinDisableWarning',
'LoginCookieValidityDisableWarning');

View File

@ -53,7 +53,6 @@ $forms['Features']['Page_titles'] = array(
'TitleDatabase',
'TitleServer');
$forms['Features']['Warnings'] = array(
'ServerLibraryDifference_DisableWarning',
'PmaNoRelation_DisableWarning',
'SuhosinDisableWarning',
'LoginCookieValidityDisableWarning',