1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Add documentation links to function names

This commit is contained in:
Michal Čihař
2011-06-06 16:21:23 +02:00
parent 9b0b9b0b59
commit 55d8b1efa0

View File

@@ -2089,7 +2089,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
function PMA_SQP_formatHtml($arr, $mode='color', $start_token=0,
$number_of_tokens=-1)
{
global $PMA_SQPdata_operators_docs;
global $PMA_SQPdata_operators_docs, $PMA_SQPdata_functions_docs;
//DEBUG echo 'in Format<pre>'; print_r($arr); echo '</pre>';
// then check for an array
if (! is_array($arr)) {
@@ -2395,6 +2395,18 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$after .= ' ';
}
break;
case 'alpha_functionName':
$funcname = strtoupper($arr[$i]['data']);
if ($docu && isset($PMA_SQPdata_functions_docs[$funcname])) {
$before .= PMA_showMySQLDocu(
'functions',
$PMA_SQPdata_functions_docs[$funcname]['link'],
false,
$PMA_SQPdata_functions_docs[$funcname]['anchor'],
true);
$after .= '</a>';
}
break;
case 'alpha_reservedWord':
// do not uppercase the reserved word if we are calling
// this function in query_only mode, because we need