Skip to content
Permalink
Browse files

Retrieve parameters from $_POST in ajax.php

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information...
mauriciofauth committed Aug 29, 2018
1 parent 5109c17 commit 88e162b651dfbd64c98ac40976023c4b7d1438bb
Showing with 4 additions and 4 deletions.
  1. +4 −4 ajax.php
@@ -27,19 +27,19 @@
break;
case 'list-tables':
Util::checkParameters(array('db'), true);
$response->addJSON('tables', $GLOBALS['dbi']->getTables($_REQUEST['db']));
$response->addJSON('tables', $GLOBALS['dbi']->getTables($_POST['db']));
break;
case 'list-columns':
Util::checkParameters(array('db', 'table'), true);
$response->addJSON('columns', $GLOBALS['dbi']->getColumnNames($_REQUEST['db'], $_REQUEST['table']));
$response->addJSON('columns', $GLOBALS['dbi']->getColumnNames($_POST['db'], $_POST['table']));
break;
case 'config-get':
Util::checkParameters(array('key'), true);
$response->addJSON('value', $GLOBALS['PMA_Config']->get($_REQUEST['key']));
$response->addJSON('value', $GLOBALS['PMA_Config']->get($_POST['key']));
break;
case 'config-set':
Util::checkParameters(array('key', 'value'), true);
$result = $GLOBALS['PMA_Config']->setUserValue(null, $_REQUEST['key'], json_decode($_REQUEST['value']));
$result = $GLOBALS['PMA_Config']->setUserValue(null, $_POST['key'], json_decode($_POST['value']));
if ($result !== true) {
$response = Response::getInstance();
$response->setRequestStatus(false);

0 comments on commit 88e162b

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