bug #2954916 [interface] Do not insert doc links to not formatted SQL.

This commit is contained in:
Michal Čihař
2010-02-25 09:11:42 +00:00
parent 4ad6f11561
commit 1cdc4cc50a
2 changed files with 83 additions and 67 deletions

View File

@@ -44,6 +44,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ [lang] Add English (United Kingdom) translation, thanks to Robert Readman.
+ patch #2948421 [auth] HTTP Basic auth realm name,
thanks to Harald Jenny - haraldj
- bug #2954916 [interface] Do not insert doc links to not formatted SQL.
3.3.1.0 (not yet released)
- bug #2941037 [core] Database structure not sorted by table correctly

View File

@@ -2080,14 +2080,17 @@ if (! defined('PMA_MINIMUM_COMMON')) {
case 'color':
$str = '<span class="syntax">';
$html_line_break = '<br />';
$docu = TRUE;
break;
case 'query_only':
$str = '';
$html_line_break = "\n";
$docu = FALSE;
break;
case 'text':
$str = '';
$html_line_break = '<br />';
$docu = TRUE;
break;
} // end switch
$close_docu_link = false;
@@ -2274,6 +2277,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$infunction = ($functionlevel > 0) ? TRUE : FALSE;
break;
case 'alpha_columnType':
if ($docu) {
switch ($arr[$i]['data']) {
case 'tinyint':
case 'smallint':
@@ -2316,6 +2320,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$after = '</a>' . $after;
break;
}
}
if ($typearr[3] == 'alpha_columnAttrib') {
$after .= ' ';
}
@@ -2406,6 +2411,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
case 'ANALYZE':
case 'ANALYSE':
case 'OPTIMIZE':
if ($docu) {
switch ($arr[$i + 1]['data']) {
case 'EVENT':
case 'TABLE':
@@ -2425,6 +2431,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$before .= PMA_showMySQLDocu('SQL-Syntax', $arr[$i]['data'] . '_LOGFILE_GROUP', false, '', true);
$close_docu_link = true;
}
}
if (!$in_priv_list) {
$space_punct_listsep = $html_line_break;
$space_alpha_reserved_word = ' ';
@@ -2447,7 +2454,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
break;
case 'SET':
if ($i == 0 || $arr[$i - 1]['data'] != 'CHARACTER') {
if ($docu && ($i == 0 || $arr[$i - 1]['data'] != 'CHARACTER')) {
$before .= PMA_showMySQLDocu('SQL-Syntax', $arr[$i]['data'], false, '', true);
$after = '</a>' . $after;
}
@@ -2461,8 +2468,10 @@ if (! defined('PMA_MINIMUM_COMMON')) {
case 'DELETE':
case 'SHOW':
case 'UPDATE':
if ($docu) {
$before .= PMA_showMySQLDocu('SQL-Syntax', $arr[$i]['data'], false, '', true);
$after = '</a>' . $after;
}
if (!$in_priv_list) {
$space_punct_listsep = $html_line_break;
$space_alpha_reserved_word = ' ';
@@ -2470,8 +2479,10 @@ if (! defined('PMA_MINIMUM_COMMON')) {
break;
case 'INSERT':
case 'REPLACE':
if ($docu) {
$before .= PMA_showMySQLDocu('SQL-Syntax', $arr[$i]['data'], false, '', true);
$after = '</a>' . $after;
}
if (!$in_priv_list) {
$space_punct_listsep = $html_line_break;
$space_alpha_reserved_word = $html_line_break;
@@ -2482,16 +2493,20 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$space_alpha_reserved_word = $html_line_break;
break;
case 'SELECT':
if ($docu) {
$before .= PMA_showMySQLDocu('SQL-Syntax', 'SELECT', false, '', true);
$after = '</a>' . $after;
}
$space_punct_listsep = ' ';
$space_alpha_reserved_word = $html_line_break;
break;
case 'CALL':
case 'DO':
case 'HANDLER':
if ($docu) {
$before .= PMA_showMySQLDocu('SQL-Syntax', $arr[$i]['data'], false, '', true);
$after = '</a>' . $after;
}
break;
default:
break;