Use pma-bbcode for trigger_error messages

This commit is contained in:
Jo Michael 2012-04-08 21:09:31 +02:00
parent ea65b806ab
commit 4521b28517
4 changed files with 11 additions and 10 deletions

View File

@ -602,11 +602,11 @@ require './libraries/select_lang.lib.php';
* this check is done here after loading language files to present errors in locale
*/
if ($GLOBALS['PMA_Config']->error_config_file) {
$error = '<h1>' . __('Failed to read configuration file') . '</h1>'
$error = '[strong]' . __('Failed to read configuration file') . '[/strong][br][br]'
. _('This usually means there is a syntax error in it, please check any errors shown below.')
. '<br />'
. '<br />'
. '<iframe src="show_config_errors.php" />';
. '[br]'
. '[br]'
. '[conferr]';
trigger_error($error, E_USER_ERROR);
}
if ($GLOBALS['PMA_Config']->error_config_default_file) {
@ -617,7 +617,7 @@ if ($GLOBALS['PMA_Config']->error_config_default_file) {
trigger_error($error, E_USER_ERROR);
}
if ($GLOBALS['PMA_Config']->error_pma_uri) {
trigger_error(__('The <code>$cfg[\'PmaAbsoluteUri\']</code> directive MUST be set in your configuration file!'), E_USER_ERROR);
trigger_error(__('The [code]$cfg[\'PmaAbsoluteUri\'][/code] directive MUST be set in your configuration file!'), E_USER_ERROR);
}

View File

@ -63,7 +63,7 @@ function PMA_RTN_main()
trigger_error(
__('You are using PHP\'s deprecated \'mysql\' extension, '
. 'which is not capable of handling multi queries. '
. '<b>The execution of some stored routines may fail!</b> '
. '[strong]The execution of some stored routines may fail![/strong] '
. 'Please use the improved \'mysqli\' extension to '
. 'avoid any problems.'),
E_USER_WARNING

View File

@ -110,8 +110,9 @@ function PMA_sanitize($message, $escape = false, $safe = false)
'[/kbd]' => '</kbd>',
'[br]' => '<br />',
'[/a]' => '</a>',
'[sup]' => '<sup>',
'[/sup]' => '</sup>',
'[sup]' => '<sup>',
'[/sup]' => '</sup>',
'[conferr]' => '<iframe src="show_config_errors.php" />' // used in common.inc.php
);
/* Adjust links for setup, which lives in subfolder */
if (defined('PMA_SETUP')) {

View File

@ -289,14 +289,14 @@ if (! @extension_loaded('mbstring')) {
*/
$gc_time = (int)@ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity'] ) {
trigger_error(PMA_Message::decodeBB(__('Your PHP parameter [a@http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime@]session.gc_maxlifetime[/a] is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.')), E_USER_WARNING);
trigger_error(__('Your PHP parameter [a@http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime@]session.gc_maxlifetime[/a] is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.'), E_USER_WARNING);
}
/**
* Check whether LoginCookieValidity is limited by LoginCookieStore.
*/
if ($GLOBALS['cfg']['LoginCookieStore'] != 0 && $GLOBALS['cfg']['LoginCookieStore'] < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB(__('Login cookie store is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.')), E_USER_WARNING);
trigger_error(__('Login cookie store is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.'), E_USER_WARNING);
}
/**