Show the SQL queries too in an Ajax response.
This commit is contained in:
@@ -133,6 +133,7 @@ $(document).ready(function() {
|
|||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
$("#add_user_dialog").dialog("close").remove();
|
$("#add_user_dialog").dialog("close").remove();
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
|
$("#topmenucontainer").after(data.sql_query);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");
|
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");
|
||||||
|
@@ -1339,11 +1339,12 @@ if (isset($_REQUEST['flush_privileges'])) {
|
|||||||
/**
|
/**
|
||||||
* If we are in an Ajax request for Create User/Edit User/Revoke User/Flush Privileges,
|
* If we are in an Ajax request for Create User/Edit User/Revoke User/Flush Privileges,
|
||||||
* show $message and exit.
|
* show $message and exit.
|
||||||
*
|
|
||||||
* @todo How to show the queries? Refactoring PMA_ajaxShowMessage might help
|
|
||||||
*/
|
*/
|
||||||
if( $GLOBALS['is_ajax_request'] && !isset($_REQUEST['export']) && !isset($_REQUEST['adduser']) && !isset($_REQUEST['initial']) && !isset($_REQUEST['showall']) && !isset($_REQUEST['edit_user_dialog'])) {
|
if( $GLOBALS['is_ajax_request'] && !isset($_REQUEST['export']) && !isset($_REQUEST['adduser']) && !isset($_REQUEST['initial']) && !isset($_REQUEST['showall']) && !isset($_REQUEST['edit_user_dialog'])) {
|
||||||
PMA_ajaxResponse($message, $message->isSuccess());
|
if(isset($sql_query)) {
|
||||||
|
$extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
|
||||||
|
}
|
||||||
|
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user