Merge pull request #535 from scnakandala/gsoc_2013

Refactoring SQL executor
This commit is contained in:
Marc Delisle 2013-07-22 12:26:48 -07:00
commit 699b2c38ec
2 changed files with 22 additions and 14 deletions

View File

@ -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
*/

View File

@ -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
);
}
}
?>