From 19484adb03bfc831b247d75b13d0986eb421a332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 15 Dec 2017 12:20:57 +0100 Subject: [PATCH] Adjust field drop to use POST MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #13866 Signed-off-by: Michal Čihař (cherry picked from commit 613a146e97e34e6b05d7c8c6de15afdb39d8da2b) Signed-off-by: Maurício Meneghini Fauth --- js/tbl_structure.js | 11 ++++------- templates/table/structure/table_structure_row.phtml | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 77744fd796..45c5e0695b 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -211,14 +211,11 @@ AJAX.registerOnload('tbl_structure.js', function () { * @var question String containing the question to be asked for confirmation */ var question = PMA_sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` DROP `' + escapeHtml(curr_column_name) + '`;'); - $(this).PMA_confirm(question, $(this).attr('href'), function (url) { + var $this_anchor = $(this); + $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strDroppingColumn, false); - var params = { - 'is_js_confirmed' : 1, - 'ajax_request' : true, - 'ajax_page_request' : true, - 'token': PMA_commonParams.get('token') - }; + var params = getJSConfirmCommonParam(this, $this_anchor.attr('data-post')); + params += '&ajax_page_request=1'; $.post(url, params, function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_ajaxRemoveMessage($msg); diff --git a/templates/table/structure/table_structure_row.phtml b/templates/table/structure/table_structure_row.phtml index c7306c9366..175bd46181 100644 --- a/templates/table/structure/table_structure_row.phtml +++ b/templates/table/structure/table_structure_row.phtml @@ -46,7 +46,7 @@ -