Merge remote-tracking branch 'origin/pull/11880' into QA_4_6

This commit is contained in:
Michal Čihař 2016-02-09 16:44:08 +01:00
commit a6eb9468b1
2 changed files with 20 additions and 12 deletions

View File

@ -432,18 +432,23 @@ class Util
/**
* Displays a link to the documentation as an icon
*
* @param string $link documentation link
* @param string $target optional link target
* @param string $link documentation link
* @param string $target optional link target
* @param boolean $bbcode optional flag indicating whether to output bbcode
*
* @return string the html link
*
* @access public
*/
public static function showDocLink($link, $target = 'documentation')
public static function showDocLink($link, $target = 'documentation', $bbcode = false)
{
return '<a href="' . $link . '" target="' . $target . '">'
. self::getImage('b_help.png', __('Documentation'))
. '</a>';
if($bbcode){
return "[a@$link@$target][dochelpicon][/a]";
}else{
return '<a href="' . $link . '" target="' . $target . '">'
. self::getImage('b_help.png', __('Documentation'))
. '</a>';
}
} // end of the 'showDocLink()' function
/**
@ -549,16 +554,17 @@ class Util
/**
* Displays a link to the phpMyAdmin documentation
*
* @param string $page Page in documentation
* @param string $anchor Optional anchor in page
* @param string $page Page in documentation
* @param string $anchor Optional anchor in page
* @param boolean $bbcode Optional flag indicating whether to output bbcode
*
* @return string the html link
*
* @access public
*/
public static function showDocu($page, $anchor = '')
public static function showDocu($page, $anchor = '', $bbcode = false)
{
return self::showDocLink(self::getDocuLink($page, $anchor));
return self::showDocLink(self::getDocuLink($page, $anchor), 'documentation', $bbcode);
} // end of the 'showDocu()' function
/**
@ -2180,8 +2186,8 @@ class Util
$error_message .= $reported_script_name
. ': ' . __('Missing parameter:') . ' '
. $param
. self::showDocu('faq', 'faqmissingparameters')
. '<br />';
. self::showDocu('faq', 'faqmissingparameters',true)
. '[br]';
$found_error = true;
}
}

View File

@ -131,6 +131,8 @@ function PMA_sanitize($message, $escape = false, $safe = false)
'[/sup]' => '</sup>',
// used in common.inc.php:
'[conferr]' => '<iframe src="show_config_errors.php" />',
// used in libraries/Util.php
'[dochelpicon]' => PMA\libraries\Util::getImage('b_help.png', __('Documentation')),
);
$message = strtr($message, $replace_pairs);