Simplify MySQL modules warnings by using standard functions.
This commit is contained in:
@@ -45,12 +45,7 @@ if (! PMA_DBI_checkMysqlExtension($GLOBALS['cfg']['Server']['extension'])) {
|
||||
* @todo add different messages for alternative extension
|
||||
* and complete fail (no alternative extension too)
|
||||
*/
|
||||
$error =
|
||||
sprintf(PMA_sanitize(__('Cannot load [a@http://php.net/%1@Documentation][em]%1[/em][/a] extension. Please check your PHP configuration.')),
|
||||
$GLOBALS['cfg']['Server']['extension'])
|
||||
.' - <a href="./Documentation.html#faqmysql" target="documentation">'
|
||||
.__('Documentation') . '</a>';
|
||||
trigger_error($error, E_USER_ERROR);
|
||||
PMA_warnMissingExtension($GLOBALS['cfg']['Server']['extension'], false, PMA_showDocu('faqmysql'));
|
||||
|
||||
if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') {
|
||||
$alternativ_extension = 'mysqli';
|
||||
@@ -60,11 +55,7 @@ if (! PMA_DBI_checkMysqlExtension($GLOBALS['cfg']['Server']['extension'])) {
|
||||
|
||||
if (! PMA_DBI_checkMysqlExtension($alternativ_extension)) {
|
||||
// if alternative fails too ...
|
||||
PMA_fatalError(
|
||||
sprintf(__('Cannot load [a@http://php.net/%1@Documentation][em]%1[/em][/a] extension. Please check your PHP configuration.'),
|
||||
$GLOBALS['cfg']['Server']['extension'])
|
||||
. ' - [a@./Documentation.html#faqmysql@documentation]'
|
||||
. __('Documentation') . '[/a]');
|
||||
PMA_warnMissingExtension($GLOBALS['cfg']['Server']['extension'], true, PMA_showDocu('faqmysql'));
|
||||
}
|
||||
|
||||
$GLOBALS['cfg']['Server']['extension'] = $alternativ_extension;
|
||||
|
Reference in New Issue
Block a user