Skip to content

Commit

Permalink
Use pma-bbcode for trigger_error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Apr 8, 2012
1 parent ea65b80 commit 4521b28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions libraries/common.inc.php
Expand Up @@ -602,11 +602,11 @@
* this check is done here after loading language files to present errors in locale * this check is done here after loading language files to present errors in locale
*/ */
if ($GLOBALS['PMA_Config']->error_config_file) { 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.') . _('This usually means there is a syntax error in it, please check any errors shown below.')
. '<br />' . '[br]'
. '<br />' . '[br]'
. '<iframe src="show_config_errors.php" />'; . '[conferr]';
trigger_error($error, E_USER_ERROR); trigger_error($error, E_USER_ERROR);
} }
if ($GLOBALS['PMA_Config']->error_config_default_file) { if ($GLOBALS['PMA_Config']->error_config_default_file) {
Expand All @@ -617,7 +617,7 @@
trigger_error($error, E_USER_ERROR); trigger_error($error, E_USER_ERROR);
} }
if ($GLOBALS['PMA_Config']->error_pma_uri) { 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);
} }




Expand Down
2 changes: 1 addition & 1 deletion libraries/rte/rte_routines.lib.php
Expand Up @@ -63,7 +63,7 @@ function PMA_RTN_main()
trigger_error( trigger_error(
__('You are using PHP\'s deprecated \'mysql\' extension, ' __('You are using PHP\'s deprecated \'mysql\' extension, '
. 'which is not capable of handling multi queries. ' . '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 ' . 'Please use the improved \'mysqli\' extension to '
. 'avoid any problems.'), . 'avoid any problems.'),
E_USER_WARNING E_USER_WARNING
Expand Down
5 changes: 3 additions & 2 deletions libraries/sanitizing.lib.php
Expand Up @@ -110,8 +110,9 @@ function PMA_sanitize($message, $escape = false, $safe = false)
'[/kbd]' => '</kbd>', '[/kbd]' => '</kbd>',
'[br]' => '<br />', '[br]' => '<br />',
'[/a]' => '</a>', '[/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 */ /* Adjust links for setup, which lives in subfolder */
if (defined('PMA_SETUP')) { if (defined('PMA_SETUP')) {
Expand Down
4 changes: 2 additions & 2 deletions main.php
Expand Up @@ -289,14 +289,14 @@
*/ */
$gc_time = (int)@ini_get('session.gc_maxlifetime'); $gc_time = (int)@ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity'] ) { 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. * Check whether LoginCookieValidity is limited by LoginCookieStore.
*/ */
if ($GLOBALS['cfg']['LoginCookieStore'] != 0 && $GLOBALS['cfg']['LoginCookieStore'] < $GLOBALS['cfg']['LoginCookieValidity']) { 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);
} }


/** /**
Expand Down

0 comments on commit 4521b28

Please sign in to comment.