diff --git a/ChangeLog b/ChangeLog index e90d4e19c7..24b7f47355 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog - issue #12772 Fix case where the central columns attributes don't get filled in - issue #14049 Fix case where the query builder doesn't work when selected column is * - issue #14029 Revert "Browse" table CSS overflow +- issue #14241 Dropping indexes and foreign keys fail 4.8.0.1 (2018-04-19) - issue [security] Multiple CSRF vulnerabilities, See PMASA-2018-02 diff --git a/js/indexes.js b/js/indexes.js index d096144439..19744833c9 100644 --- a/js/indexes.js +++ b/js/indexes.js @@ -601,10 +601,7 @@ AJAX.registerOnload('indexes.js', function () { $anchor.PMA_confirm(question, $anchor.attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strDroppingPrimaryKeyIndex, false); - var params = { - 'is_js_confirmed': 1, - 'ajax_request': true - }; + var params = getJSConfirmCommonParam(this, $anchor.getPostData()); $.post(url, params, function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_ajaxRemoveMessage($msg); diff --git a/js/tbl_relation.js b/js/tbl_relation.js index a2211f4e7c..6446b8b1e6 100644 --- a/js/tbl_relation.js +++ b/js/tbl_relation.js @@ -222,10 +222,7 @@ AJAX.registerOnload('tbl_relation.js', function () { $anchor.PMA_confirm(question, $anchor.attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strDroppingForeignKey, false); - var params = { - 'is_js_confirmed': 1, - 'ajax_request': true - }; + var params = getJSConfirmCommonParam(this, $anchor.getPostData()); $.post(url, params, function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msg); diff --git a/libraries/classes/Index.php b/libraries/classes/Index.php index 6a456ae095..c971e5b363 100644 --- a/libraries/classes/Index.php +++ b/libraries/classes/Index.php @@ -765,12 +765,12 @@ class Index $r .= ''; $r .= ''; - $r .= ' ' - . Util::getIcon('b_drop', __('Drop')) . '' - . '' . "\n"; + $r .= Util::linkOrButton( + 'sql.php' . Url::getCommon($this_params), + Util::getIcon('b_drop', __('Drop')), + array('class' => 'drop_primary_key_index_anchor ajax') + ); + $r .= '' . "\n"; } if (! $print_mode) { diff --git a/templates/table/relation/foreign_key_row.twig b/templates/table/relation/foreign_key_row.twig index caab9a4251..4e73bf1188 100644 --- a/templates/table/relation/foreign_key_row.twig +++ b/templates/table/relation/foreign_key_row.twig @@ -26,10 +26,9 @@ {% if one_key['constraint'] is defined %} - - {{ Util_getIcon('b_drop', 'Drop'|trans) }} - + {% set drop_url = 'sql.php' ~ Url_getCommon(this_params) %} + {% set drop_str = Util_getIcon('b_drop', 'Drop'|trans) %} + {{ Util_linkOrButton(drop_url, drop_str, {'class': 'drop_foreign_key_anchor ajax'}) }} {% endif %}