From e431b2944b1a3536b341fab0b7fb2c8f8f5a80bc Mon Sep 17 00:00:00 2001 From: xmujay Date: Wed, 10 Apr 2013 22:06:58 +0800 Subject: [PATCH] function PMA_sqlQueryFormInsert refactor: 0.split long lines 1 render the HTML element at once 2 fix HTML and PHP mixture 3 fix code indention 4 use $html for readability --- libraries/sql_query_form.lib.php | 123 +++++++++++++++++-------------- 1 file changed, 66 insertions(+), 57 deletions(-) diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 7f5387412c..93c7d75e73 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -160,7 +160,7 @@ function PMA_sqlQueryFormInsert( ) { // enable auto select text in textarea if ($GLOBALS['cfg']['TextareaAutoSelect']) { - $auto_sel = ' onclick="selectContent(this, sql_box_locked, true)"'; + $auto_sel = ' onclick="selectContent(this, sql_box_locked, true);"'; } else { $auto_sel = ''; } @@ -241,12 +241,12 @@ function PMA_sqlQueryFormInsert( $sqlquerycontainer_id = 'sqlquerycontainerfull'; } - echo '' . "\n" + $html = '' . "\n" .'
' . "\n" .'
' . "\n"; - echo '' . $legend . '' . "\n"; - echo '
' . "\n"; - echo '
' . "\n" + $html .= '' . $legend . '' . "\n"; + $html .= '
' . "\n"; + $html .= '
' . "\n" .'