[Refactor] function PMA_PMA_sqlQueryForm refactor:
0.split long lines 1 render the HTML element at once
This commit is contained in:
parent
c15617fe3c
commit
1fa8851468
@ -92,28 +92,32 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
|
||||
return checkSqlQuery(this)">
|
||||
<?php
|
||||
} else {
|
||||
echo '<form method="post" action="import.php" ' . $enctype;
|
||||
echo ' class="ajax"';
|
||||
echo ' id="sqlqueryform" name="sqlform">' . "\n";
|
||||
$html = '<form method="post" action="import.php" ' . $enctype;
|
||||
$html .= ' class="ajax"';
|
||||
$html .= ' id="sqlqueryform" name="sqlform">' . "\n";
|
||||
}
|
||||
|
||||
if ($is_querywindow) {
|
||||
echo '<input type="hidden" name="focus_querywindow" value="true" />'
|
||||
."\n";
|
||||
$html .= '<input type="hidden" name="focus_querywindow"'
|
||||
.' value="true" />' . "\n";
|
||||
if ($display_tab != 'sql' && $display_tab != 'full') {
|
||||
echo '<input type="hidden" name="sql_query" value="" />' . "\n";
|
||||
echo '<input type="hidden" name="show_query" value="1" />' . "\n";
|
||||
$html .= '<input type="hidden" name="sql_query"'
|
||||
.' value="" />' . "\n";
|
||||
$html .= '<input type="hidden" name="show_query"'
|
||||
.' value="1" />' . "\n";
|
||||
}
|
||||
}
|
||||
echo '<input type="hidden" name="is_js_confirmed" value="0" />' . "\n"
|
||||
.PMA_generate_common_hidden_inputs($db, $table) . "\n"
|
||||
$html .= '<input type="hidden" name="is_js_confirmed" value="0" />'
|
||||
. "\n" . PMA_generate_common_hidden_inputs($db, $table) . "\n"
|
||||
.'<input type="hidden" name="pos" value="0" />' . "\n"
|
||||
.'<input type="hidden" name="goto" value="'
|
||||
.htmlspecialchars($goto) . '" />' . "\n"
|
||||
.'<input type="hidden" name="message_to_show" value="'
|
||||
. __('Your SQL query has been executed successfully') . '" />' . "\n"
|
||||
.'<input type="hidden" name="prev_sql_query" value="'
|
||||
. __('Your SQL query has been executed successfully') . '" />'
|
||||
. "\n" .'<input type="hidden" name="prev_sql_query" value="'
|
||||
. htmlspecialchars($query) . '" />' . "\n";
|
||||
|
||||
echo $html;
|
||||
|
||||
// display querybox
|
||||
if ($display_tab === 'full' || $display_tab === 'sql') {
|
||||
@ -137,11 +141,11 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
|
||||
echo PMA_set_enc_form(' ');
|
||||
}
|
||||
|
||||
echo '</form>' . "\n";
|
||||
|
||||
$html = '</form>' . "\n";
|
||||
// print an empty div, which will be later filled with
|
||||
// the sql query results by ajax
|
||||
echo '<div id="sqlqueryresults"></div>';
|
||||
$html .= '<div id="sqlqueryresults"></div>';
|
||||
echo $html;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user