diff --git a/js/server_privileges.js b/js/server_privileges.js index 362a27b7b..a2122e47a 100755 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -133,6 +133,7 @@ $(document).ready(function() { if(data.success == true) { $("#add_user_dialog").dialog("close").remove(); PMA_ajaxShowMessage(data.message); + $("#topmenucontainer").after(data.sql_query); } else { PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000"); diff --git a/server_privileges.php b/server_privileges.php index 05297dd13..836313b5d 100755 --- a/server_privileges.php +++ b/server_privileges.php @@ -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, * 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'])) { - 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); } /**