Skip to content
Permalink
Browse files

Retrieve parameters from $_POST in table search

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information...
mauriciofauth committed Nov 10, 2018
1 parent 34972f0 commit 6fd9bfb75b357e375c8992a8c9194411954a8427
@@ -212,7 +212,7 @@ public function indexAction()
)
);
if (isset($_REQUEST['range_search'])) {
if (isset($_POST['range_search'])) {
$this->rangeSearchAction();
return;
@@ -253,8 +253,8 @@ public function indexAction()
*
* @var boolean Object containing parameters for the POST request
*/
if (isset($_REQUEST['get_data_row'])
&& $_REQUEST['get_data_row'] == true
if (isset($_POST['get_data_row'])
&& $_POST['get_data_row'] == true
) {
$this->getDataRowAction();
@@ -266,8 +266,8 @@ public function indexAction()
*
* @var boolean Object containing parameters for the POST request
*/
if (isset($_REQUEST['change_tbl_info'])
&& $_REQUEST['change_tbl_info'] == true
if (isset($_POST['change_tbl_info'])
&& $_POST['change_tbl_info'] == true
) {
$this->changeTableInfoAction();
@@ -390,7 +390,7 @@ public function zoomSubmitAction($dataLabel, $goto)
*/
public function changeTableInfoAction()
{
$field = $_REQUEST['field'];
$field = $_POST['field'];
if ($field == 'pma_null') {
$this->response->addJSON('field_type', '');
$this->response->addJSON('field_collation', '');
@@ -400,8 +400,8 @@ public function changeTableInfoAction()
}
$key = array_search($field, $this->_columnNames);
$search_index
= ((isset($_REQUEST['it']) && is_numeric($_REQUEST['it']))
? intval($_REQUEST['it']) : 0);
= ((isset($_POST['it']) && is_numeric($_POST['it']))
? intval($_POST['it']) : 0);
$properties = $this->getColumnProperties($search_index, $key);
$this->response->addJSON(
@@ -420,8 +420,8 @@ public function changeTableInfoAction()
public function getDataRowAction()
{
$extra_data = array();
$row_info_query = 'SELECT * FROM `' . $_REQUEST['db'] . '`.`'
. $_REQUEST['table'] . '` WHERE ' . $_REQUEST['where_clause'];
$row_info_query = 'SELECT * FROM `' . $_POST['db'] . '`.`'
. $_POST['table'] . '` WHERE ' . $_POST['where_clause'];
$result = $this->dbi->query(
$row_info_query . ";",
DatabaseInterface::CONNECT_USER,
@@ -542,7 +542,7 @@ public function displaySelectionFormAction($dataLabel = null)
*/
public function rangeSearchAction()
{
$min_max = $this->getColumnMinMax($_REQUEST['column']);
$min_max = $this->getColumnMinMax($_POST['column']);
$this->response->addJSON('column_data', $min_max);
}
@@ -381,9 +381,9 @@ function () {
);
$ctrl = $container->get('TableSearchController');
$_REQUEST['db'] = 'PMA';
$_REQUEST['table'] = 'PMA_BookMark';
$_REQUEST['where_clause'] = '`col1` = 1';
$_POST['db'] = 'PMA';
$_POST['table'] = 'PMA_BookMark';
$_POST['where_clause'] = '`col1` = 1';
$expected = array(
'col1' => 1,
'col2' => 2

0 comments on commit 6fd9bfb

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