diff --git a/js/sql.js b/js/sql.js index e561ba5bf5..a27c9c66b5 100644 --- a/js/sql.js +++ b/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 */ diff --git a/tbl_row_action.php b/tbl_row_action.php index b9ccaa4a3c..121f05a18b 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -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 + ); } } ?>