Fix indentation

This commit is contained in:
Michal Čihař
2011-04-18 16:44:27 +02:00
parent ee5ff995fb
commit b47903e03f

View File

@@ -1747,11 +1747,11 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} }
} }
if ($in_limit) { if ($in_limit) {
if ($upper_data == 'OFFSET') { if ($upper_data == 'OFFSET') {
$limit_clause .= $sep; $limit_clause .= $sep;
} }
$limit_clause .= $arr[$i]['data']; $limit_clause .= $arr[$i]['data'];
if ($upper_data == 'LIMIT' || $upper_data == 'OFFSET') { if ($upper_data == 'LIMIT' || $upper_data == 'OFFSET') {
$limit_clause .= $sep; $limit_clause .= $sep;
} }
@@ -2119,8 +2119,8 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// of $cfg['SQP']['fmtType'] to make possible a replacement // of $cfg['SQP']['fmtType'] to make possible a replacement
// for inline editing // for inline editing
if ($mode!='query_only') { if ($mode!='query_only') {
$str .= '<span class="inner_sql">'; $str .= '<span class="inner_sql">';
} }
$close_docu_link = false; $close_docu_link = false;
$indent = 0; $indent = 0;
$bracketlevel = 0; $bracketlevel = 0;
@@ -2296,20 +2296,20 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} }
break; break;
case 'punct_bracket_close_round': case 'punct_bracket_close_round':
// only close bracket level when it was opened before // only close bracket level when it was opened before
if ($bracketlevel > 0) { if ($bracketlevel > 0) {
$bracketlevel--; $bracketlevel--;
if ($infunction == TRUE) { if ($infunction == TRUE) {
$functionlevel--; $functionlevel--;
$after .= ' '; $after .= ' ';
$before .= ' '; $before .= ' ';
} else { } else {
$indent--; $indent--;
$before .= ($mode != 'query_only' ? '</div>' : ' '); $before .= ($mode != 'query_only' ? '</div>' : ' ');
} }
$infunction = ($functionlevel > 0) ? TRUE : FALSE; $infunction = ($functionlevel > 0) ? TRUE : FALSE;
} }
break; break;
case 'alpha_columnType': case 'alpha_columnType':
if ($docu) { if ($docu) {
switch ($arr[$i]['data']) { switch ($arr[$i]['data']) {
@@ -2612,20 +2612,20 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} }
$str .= $after; $str .= $after;
} // end for } // end for
// close unclosed indent levels // close unclosed indent levels
while ($indent > 0) { while ($indent > 0) {
$indent--; $indent--;
$str .= ($mode != 'query_only' ? '</div>' : ' '); $str .= ($mode != 'query_only' ? '</div>' : ' ');
} }
/* End possibly unclosed documentation link */ /* End possibly unclosed documentation link */
if ($close_docu_link) { if ($close_docu_link) {
$str .= '</a>'; $str .= '</a>';
$close_docu_link = false; $close_docu_link = false;
} }
if ($mode!='query_only') { if ($mode!='query_only') {
// close inner_sql span // close inner_sql span
$str .= '</span>'; $str .= '</span>';
} }
if ($mode=='color') { if ($mode=='color') {
// close syntax span // close syntax span
$str .= '</span>'; $str .= '</span>';