Adjust adding table key operations to use POST

Issue #13866

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-12-15 12:13:46 +01:00
parent 8332861d62
commit 6ee2f12841
3 changed files with 9 additions and 8 deletions

View File

@ -304,13 +304,14 @@ AJAX.registerOnload('tbl_structure.js', function () {
var question = PMA_sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' +
escapeHtml(curr_table_name) + '` ' + add_clause + '(`' + 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) {
PMA_ajaxShowMessage();
AJAX.source = $this;
var params = {
'ajax_request' : true,
'ajax_page_request' : true
};
var params = getJSConfirmCommonParam(this, $this_anchor.attr('data-post'));
params += '&ajax_page_request=1';
$.post(url, params, AJAX.responseHandler);
}); // end $.PMA_confirm()
}); // end Add key

View File

@ -14,7 +14,7 @@
add_unique_anchor
{%- elseif action == 'Spatial' %}
add_spatial_anchor
{%- endif %}" href="tbl_structure.php{{ url_query|raw -}}
{%- endif %}" href="tbl_structure.php" data-post="{{ url_query|raw -}}
&amp;add_key=1&amp;sql_query=
{{- ('ALTER TABLE ' ~
Util_backquote(table) ~

View File

@ -90,8 +90,8 @@
or tbl_storage_engine == 'MARIA'
or (tbl_storage_engine == 'INNODB' and mysql_int_version >= 50604)
) and ('text' in type or 'char' in type) %}
<a rel="samepage" class="ajax add_key add_fulltext_anchor" href="tbl_structure.php
{{- url_query|raw }}&amp;add_key=1&amp;sql_query=
<a rel="samepage" class="ajax add_key add_fulltext_anchor" href="tbl_structure.php"
data-post="{{- url_query|raw }}&amp;add_key=1&amp;sql_query=
{{- ('ALTER TABLE ' ~ Util_backquote(table)
~ ' ADD FULLTEXT(' ~ Util_backquote(row['Field'])
~ ');')|url_encode }}&amp;message_to_show=