The branch, master has been updated
via 5d915f1ff6e04a40c748ad42ad212fa91992d70e (commit)
via 8afdcbe2b89888b4e7e3ca58224cb01ebe8db73c (commit)
from ce446d8f6884d737142f58ccaf6de3dd61109c84 (commit)
- Log -----------------------------------------------------------------
commit 5d915f1ff6e04a40c748ad42ad212fa91992d70e
Merge: ce446d8f6884d737142f58ccaf6de3dd61109c84 8afdcbe2b89888b4e7e3ca58224cb01ebe8db73c
Author: Dieter Adriaenssens <ruleant(a)users.sourceforge.net>
Date: Mon Dec 13 21:36:51 2010 +0100
Merge branch 'QA_3_3'
Conflicts:
libraries/sqlparser.lib.php
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
libraries/sqlparser.lib.php | 33 ++++++++++++++++++++-------------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a804ef8..7eb6924 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -136,6 +136,7 @@
thanks to Craig Duncan - duncan3dc
- bug #3112614 [pdf schema] Scratchboard for PDF pages not working
- bug #3125606 [parser] Query for table "level" causes strange display
+- bug #3127904 [parser] Close all opened round brackets indents
3.3.8.1 (2010-11-29)
- bug #3115519 (private) [security] XSS on db search, see PMASA-2010-8
diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php
index a6676e4..e5d2f6e 100644
--- a/libraries/sqlparser.lib.php
+++ b/libraries/sqlparser.lib.php
@@ -2197,7 +2197,6 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// DEBUG echo "Loop format <strong>" . $arr[$i]['data'] .
"</strong> " . $arr[$i]['type'] . "<br />";
$before = '';
$after = '';
- $indent = 0;
// array_shift($typearr);
/*
0 prev2
@@ -2297,17 +2296,20 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
break;
case 'punct_bracket_close_round':
- $bracketlevel--;
- if ($infunction == TRUE) {
- $functionlevel--;
- $after .= ' ';
- $before .= ' ';
- } else {
- $indent--;
- $before .= ($mode != 'query_only' ?
'</div>' : ' ');
- }
- $infunction = ($functionlevel > 0) ? TRUE : FALSE;
- break;
+ // only close bracket level when it was opened before
+ if ($bracketlevel > 0) {
+ $bracketlevel--;
+ if ($infunction == TRUE) {
+ $functionlevel--;
+ $after .= ' ';
+ $before .= ' ';
+ } else {
+ $indent--;
+ $before .= ($mode != 'query_only' ? '</div>' : '
');
+ }
+ $infunction = ($functionlevel > 0) ? TRUE : FALSE;
+ }
+ break;
case 'alpha_columnType':
if ($docu) {
switch ($arr[$i]['data']) {
@@ -2610,7 +2612,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
$str .= $after;
} // end for
- /* End possibly unclosed documentation link */
+ // close unclosed indent levels
+ while ($indent > 0) {
+ $indent--;
+ $str .= ($mode != 'query_only' ? '</div>' : ' ');
+ }
+ /* End possibly unclosed documentation link */
if ($close_docu_link) {
$str .= '</a>';
$close_docu_link = false;
hooks/post-receive
--
phpMyAdmin
Show replies by date