Merge pull request #535 from scnakandala/gsoc_2013
Refactoring SQL executor
This commit is contained in:
commit
699b2c38ec
11
js/sql.js
11
js/sql.js
@ -426,6 +426,17 @@ AJAX.registerOnload('sql.js', function () {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks whether atleast one row is selected for selcted row editing and export
|
||||
*/
|
||||
$("#resultsForm.ajax .mult_submit[value=delete]," +
|
||||
"#resultsForm.ajax .mult_submit[value=export]").live('click', function (event) {
|
||||
/*Check whether atleast one row is selected for change*/
|
||||
if (!$("#table_results tbody tr, #table_results tbody tr td").hasClass("marked")) {
|
||||
event.preventDefault();
|
||||
PMA_ajaxShowMessage(PMA_messages.strNoRowSelected);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Click action for "Go" button in ajax dialog insertForm -> insertRowTable
|
||||
*/
|
||||
|
||||
@ -11,18 +11,7 @@
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/mysql_charsets.inc.php';
|
||||
|
||||
/**
|
||||
* No rows were selected => show again the query and tell that user.
|
||||
*/
|
||||
if (! PMA_isValid($_REQUEST['rows_to_delete'], 'array')
|
||||
&& ! isset($_REQUEST['mult_btn'])
|
||||
) {
|
||||
$disp_message = __('No rows selected');
|
||||
$disp_query = '';
|
||||
include 'sql.php';
|
||||
exit;
|
||||
}
|
||||
require_once 'libraries/sql.lib.php';
|
||||
|
||||
if (isset($_REQUEST['submit_mult'])) {
|
||||
$submit_mult = $_REQUEST['submit_mult'];
|
||||
@ -136,8 +125,16 @@ if (!empty($submit_mult)) {
|
||||
unset($submit_mult, $_REQUEST['mult_btn']);
|
||||
|
||||
$active_page = 'sql.php';
|
||||
include 'sql.php';
|
||||
break;
|
||||
/**
|
||||
* Parse and analyze the query
|
||||
*/
|
||||
require_once 'libraries/parse_analyze.inc.php';
|
||||
|
||||
PMA_executeQueryAndSendQueryResponse(
|
||||
$analyzed_sql_results, false, $db, $table, null, null, null, false, null,
|
||||
null, null, null, $goto, $pmaThemeImage, null, null, null, $sql_query,
|
||||
null, null
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user