From 54f78660e0ec12a092627ff146219031d52e3151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Horv=C3=A1th?= Date: Thu, 11 Oct 2018 22:35:08 +0200 Subject: [PATCH 1/4] Fix for #14571 - "No database selected" - DROP a view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vincent Horváth (cherry picked from commit 36ae547c638e225fb018520e4fc168b70b05fa84) Signed-off-by: William Desportes --- js/tbl_operations.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/tbl_operations.js b/js/tbl_operations.js index 59b8c534e7..72a1624d6e 100644 --- a/js/tbl_operations.js +++ b/js/tbl_operations.js @@ -254,6 +254,7 @@ AJAX.registerOnload('tbl_operations.js', function () { $(document).on('click', '#drop_view_anchor.ajax', function (event) { event.preventDefault(); + var $link = $(this); /** * @var question String containing the question to be asked for confirmation */ @@ -265,10 +266,7 @@ AJAX.registerOnload('tbl_operations.js', function () { $(this).PMA_confirm(question, $(this).attr('href'), function (url) { var $msgbox = PMA_ajaxShowMessage(PMA_messages.strProcessingRequest); - var params = { - 'is_js_confirmed': '1', - 'ajax_request': true - }; + var params = getJSConfirmCommonParam(this, $link.getPostData()); $.post(url, params, function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_ajaxRemoveMessage($msgbox); From 4cddc665532b0d37f387fcd77a70ae146ec957d1 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Thu, 25 Oct 2018 22:52:24 +0200 Subject: [PATCH 2/4] Add ChangeLog entry for #14571 Signed-off-by: William Desportes --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 908da3e9e6..e9221be348 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - issue #14438 Invisible Icon "Show Full Queries" - issue #14133 CSS issue in Designer - issue #14447 Error while copying database (pma__column_info) +- issue #14571 "No database selected" - DROP a view 4.8.3 (2018-08-22) - issue #14314 Error when naming a database '0' From 3cda8e6093aa4e8116857633e2af28ea7ede76f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Horv=C3=A1th?= Date: Thu, 11 Oct 2018 17:02:41 +0200 Subject: [PATCH 3/4] Fix for #14636 - Move operation causes SELECT * FROM `undefined` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fixed params name in operation js file - set value in global field table to new table name - fixed refresh page after submit move table - fixed back quote in message result Signed-off-by: Vincent Horváth (cherry picked from commit 52024f1d2b411ac317f71fdaf6c76f8abd8a742d) Signed-off-by: William Desportes --- js/tbl_operations.js | 4 ++-- libraries/classes/Operations.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/tbl_operations.js b/js/tbl_operations.js index 72a1624d6e..cb818a292c 100644 --- a/js/tbl_operations.js +++ b/js/tbl_operations.js @@ -61,8 +61,8 @@ AJAX.registerOnload('tbl_operations.js', function () { $.post($form.attr('action'), $form.serialize() + argsep + 'submit_move=1', function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_commonParams.set('db', data._params.db); - PMA_commonParams.set('table', data._params.tbl); - PMA_commonActions.refreshMain(false, function () { + PMA_commonParams.set('table', data._params.table); + PMA_commonActions.refreshMain('tbl_sql.php', function () { PMA_ajaxShowMessage(data.message); }); // Refresh navigation when the table is copied diff --git a/libraries/classes/Operations.php b/libraries/classes/Operations.php index 7c364310b1..7f707612eb 100644 --- a/libraries/classes/Operations.php +++ b/libraries/classes/Operations.php @@ -2118,6 +2118,8 @@ class Operations $new_name = strtolower($new_name); } + $GLOBALS['table'] = $new_name; + $new = Util::backquote($_REQUEST['target_db']) . '.' . Util::backquote($new_name); $message->addParam($new); From cbd23dd8f32e83eda81a9e6d95db5602bd071c29 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Thu, 25 Oct 2018 23:16:27 +0200 Subject: [PATCH 4/4] Add ChangeLog entry for #14636 Signed-off-by: William Desportes --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index e9221be348..a1acfcf14d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ phpMyAdmin - ChangeLog - issue #14133 CSS issue in Designer - issue #14447 Error while copying database (pma__column_info) - issue #14571 "No database selected" - DROP a view +- issue #14636 Move operation causes SELECT * FROM `undefined` 4.8.3 (2018-08-22) - issue #14314 Error when naming a database '0'