Adjust field drop to use POST
Issue #13866
Signed-off-by: Michal Čihař <michal@cihar.com>
(cherry picked from commit 613a146e97)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
f6bb1901f6
commit
19484adb03
@ -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);
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="drop center print_ignore">
|
||||
<a class="drop_column_anchor ajax" href="sql.php<?= $url_query; ?>&sql_query=<?= urlencode(
|
||||
<a class="drop_column_anchor ajax" href="sql.php" data-post="<?= $url_query; ?>&sql_query=<?= urlencode(
|
||||
'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
. ' DROP ' . PMA\libraries\Util::backquote($row['Field']) . ';'); ?>&dropped_column=<?= $field_encoded; ?>&purge=1&message_to_show=<?= urlencode(sprintf(__('Column %s has been dropped.'), htmlspecialchars($row['Field']))) ?>" >
|
||||
<?= $titles['Drop']; ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user