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
|
* @todo add different messages for alternative extension
|
||||||
* and complete fail (no alternative extension too)
|
* and complete fail (no alternative extension too)
|
||||||
*/
|
*/
|
||||||
$error =
|
PMA_warnMissingExtension($GLOBALS['cfg']['Server']['extension'], false, PMA_showDocu('faqmysql'));
|
||||||
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);
|
|
||||||
|
|
||||||
if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') {
|
if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') {
|
||||||
$alternativ_extension = 'mysqli';
|
$alternativ_extension = 'mysqli';
|
||||||
@@ -60,11 +55,7 @@ if (! PMA_DBI_checkMysqlExtension($GLOBALS['cfg']['Server']['extension'])) {
|
|||||||
|
|
||||||
if (! PMA_DBI_checkMysqlExtension($alternativ_extension)) {
|
if (! PMA_DBI_checkMysqlExtension($alternativ_extension)) {
|
||||||
// if alternative fails too ...
|
// if alternative fails too ...
|
||||||
PMA_fatalError(
|
PMA_warnMissingExtension($GLOBALS['cfg']['Server']['extension'], true, PMA_showDocu('faqmysql'));
|
||||||
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]');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['cfg']['Server']['extension'] = $alternativ_extension;
|
$GLOBALS['cfg']['Server']['extension'] = $alternativ_extension;
|
||||||
|
Reference in New Issue
Block a user