Skip to content
Permalink
Browse files

Retrieve parameters from $_POST in server_databases page

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information...
madhuracj authored and mauriciofauth committed Jul 15, 2018
1 parent be0660e commit 5d781422fb9f0af54e9cf9c85371b4d8c02ac56d
Showing with 6 additions and 5 deletions.
  1. +4 −3 js/server_databases.js
  2. +2 −2 libraries/classes/Controllers/Server/ServerDatabasesController.php
@@ -60,13 +60,14 @@ AJAX.registerOnload('server_databases.js', function () {
$(this).PMA_confirm(
question,
$form.prop('action') + '?' + $(this).serialize() +
argsep + 'drop_selected_dbs=1' + argsep + 'is_js_confirmed=1' + argsep + 'ajax_request=true',
argsep + 'drop_selected_dbs=1',
function (url) {
PMA_ajaxShowMessage(PMA_messages.strProcessingRequest, false);

var params = getJSConfirmCommonParam(this);
var parts = url.split('?');
var params = getJSConfirmCommonParam(this, parts[1]);

$.post(url, params, function (data) {
$.post(parts[0], params, function (data) {
if (typeof data !== 'undefined' && data.success === true) {
PMA_ajaxShowMessage(data.message);

@@ -62,7 +62,7 @@ public function indexAction()
$response = Response::getInstance();
if (isset($_REQUEST['drop_selected_dbs'])
if (isset($_POST['drop_selected_dbs'])
&& $response->isAjax()
&& ($GLOBALS['dbi']->isSuperuser() || $GLOBALS['cfg']['AllowUserDropDatabase'])
) {
@@ -184,7 +184,7 @@ public function createDatabaseAction()
*/
public function dropDatabasesAction()
{
if (! isset($_REQUEST['selected_dbs'])) {
if (! isset($_POST['selected_dbs'])) {
$message = Message::error(__('No databases selected.'));
} else {
$action = 'server_databases.php';

0 comments on commit 5d78142

Please sign in to comment.
You can’t perform that action at this time.