Display documentation for chosen PHP extension.

This commit is contained in:
Michal Čihař
2011-02-17 10:31:42 +01:00
parent 439a24c6a2
commit 20509753ef
2 changed files with 24 additions and 2 deletions

View File

@@ -447,6 +447,28 @@ function PMA_showDocu($anchor) {
} }
} // end of the 'PMA_showDocu()' function } // end of the 'PMA_showDocu()' function
/**
* Displays a link to the PHP documentation
*
* @param string anchor in documentation
*
* @return string the html link
*
* @access public
*/
function PMA_showPHPDocu($target) {
/* l10n: Language to use for PHP documentation, please use only languages which do exist in official documentation. */
$lang = _pgettext('PHP documentation language', 'en');
$url = 'http://php.net/manual/' . $lang . '/' . $target;
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
return '<a href="' . $url . '" target="documentation"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" width="11" height="11" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
} else {
return '[<a href="' . $url . '" target="documentation">' . __('Documentation') . '</a>]';
}
} // end of the 'PMA_showPHPDocu()' function
/** /**
* returns HTML for a footnote marker and add the messsage to the footnotes * returns HTML for a footnote marker and add the messsage to the footnotes
* *

View File

@@ -199,7 +199,7 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
if ($server > 0) { if ($server > 0) {
PMA_printListItem(__('MySQL client version') . ': ' . PMA_DBI_get_client_info(), PMA_printListItem(__('MySQL client version') . ': ' . PMA_DBI_get_client_info(),
'li_mysql_client_version'); 'li_mysql_client_version');
PMA_printListItem(__('PHP extension') . ': ' . $GLOBALS['cfg']['Server']['extension'], PMA_printListItem(__('PHP extension') . ': ' . $GLOBALS['cfg']['Server']['extension'] . ' ' . PMA_showPHPDocu('book.' . $GLOBALS['cfg']['Server']['extension'] . '.php'),
'li_used_php_extension'); 'li_used_php_extension');
} }
} }
@@ -211,7 +211,7 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
echo ' </div>'; echo ' </div>';
} }
echo '<div class="group">'; echo '<div class="group pmagroup">';
echo '<h2>phpMyAdmin</h2>'; echo '<h2>phpMyAdmin</h2>';
echo '<ul>'; echo '<ul>';
$class = null; $class = null;