Retrieve parameters from $_POST in central columns page
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
98ef759676
commit
77ea7024bf
@ -84,9 +84,9 @@ $pmadb = $cfgCentralColumns['db'];
|
||||
$pmatable = $cfgCentralColumns['table'];
|
||||
$max_rows = intval($GLOBALS['cfg']['MaxRows']);
|
||||
|
||||
if (isset($_REQUEST['edit_central_columns_page'])) {
|
||||
$selected_fld = $_REQUEST['selected_fld'];
|
||||
$selected_db = $_REQUEST['db'];
|
||||
if (isset($_POST['edit_central_columns_page'])) {
|
||||
$selected_fld = $_POST['selected_fld'];
|
||||
$selected_db = $_POST['db'];
|
||||
$edit_central_column_page = $centralColumns->getHtmlForEditingPage(
|
||||
$selected_fld,
|
||||
$selected_db
|
||||
@ -109,15 +109,15 @@ if (isset($_POST['delete_save'])) {
|
||||
false
|
||||
);
|
||||
}
|
||||
if (!empty($_REQUEST['total_rows'])
|
||||
&& Core::isValid($_REQUEST['total_rows'], 'integer')
|
||||
if (!empty($_POST['total_rows'])
|
||||
&& Core::isValid($_POST['total_rows'], 'integer')
|
||||
) {
|
||||
$total_rows = $_REQUEST['total_rows'];
|
||||
$total_rows = $_POST['total_rows'];
|
||||
} else {
|
||||
$total_rows = $centralColumns->getCount($db);
|
||||
}
|
||||
if (Core::isValid($_REQUEST['pos'], 'integer')) {
|
||||
$pos = intval($_REQUEST['pos']);
|
||||
if (Core::isValid($_POST['pos'], 'integer')) {
|
||||
$pos = intval($_POST['pos']);
|
||||
} else {
|
||||
$pos = 0;
|
||||
}
|
||||
|
||||
@ -65,10 +65,10 @@ AJAX.registerOnload('db_central_columns.js', function () {
|
||||
return false;
|
||||
}
|
||||
var argsep = PMA_commonParams.get('arg_separator');
|
||||
var editColumnData = editColumnList + '' + argsep + 'edit_central_columns_page=true' + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true' + argsep + 'db=' + PMA_commonParams.get('db');
|
||||
var editColumnData = editColumnList + '' + argsep + 'edit_central_columns_page=true' + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true' + argsep + 'db=' + encodeURIComponent(PMA_commonParams.get('db'));
|
||||
PMA_ajaxShowMessage();
|
||||
AJAX.source = $(this);
|
||||
$.get('db_central_columns.php', editColumnData, AJAX.responseHandler);
|
||||
$.post('db_central_columns.php', editColumnData, AJAX.responseHandler);
|
||||
});
|
||||
$('#multi_edit_central_columns').submit(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
@ -299,7 +299,7 @@ class CentralColumns
|
||||
if (empty($cfgCentralColumns)) {
|
||||
return $this->configErrorMessage();
|
||||
}
|
||||
$db = $_REQUEST['db'];
|
||||
$db = $_POST['db'];
|
||||
$pmadb = $cfgCentralColumns['db'];
|
||||
$central_list_table = $cfgCentralColumns['table'];
|
||||
$this->dbi->selectDb($db);
|
||||
@ -333,7 +333,7 @@ class CentralColumns
|
||||
}
|
||||
} else {
|
||||
if ($table === null) {
|
||||
$table = $_REQUEST['table'];
|
||||
$table = $_POST['table'];
|
||||
}
|
||||
foreach ($field_select as $column) {
|
||||
$cols .= "'" . $this->dbi->escapeString($column) . "',";
|
||||
@ -406,7 +406,7 @@ class CentralColumns
|
||||
if (empty($cfgCentralColumns)) {
|
||||
return $this->configErrorMessage();
|
||||
}
|
||||
$db = $_REQUEST['db'];
|
||||
$db = $_POST['db'];
|
||||
$pmadb = $cfgCentralColumns['db'];
|
||||
$central_list_table = $cfgCentralColumns['table'];
|
||||
$this->dbi->selectDb($db);
|
||||
|
||||
@ -227,8 +227,8 @@ class CentralColumnsTest extends TestCase
|
||||
*/
|
||||
public function testSyncUniqueColumns()
|
||||
{
|
||||
$_REQUEST['db'] = 'PMA_db';
|
||||
$_REQUEST['table'] = 'PMA_table';
|
||||
$_POST['db'] = 'PMA_db';
|
||||
$_POST['table'] = 'PMA_table';
|
||||
|
||||
$this->assertTrue(
|
||||
$this->centralColumns->syncUniqueColumns(
|
||||
@ -244,8 +244,8 @@ class CentralColumnsTest extends TestCase
|
||||
*/
|
||||
public function testDeleteColumnsFromList()
|
||||
{
|
||||
$_REQUEST['db'] = 'PMA_db';
|
||||
$_REQUEST['table'] = 'PMA_table';
|
||||
$_POST['db'] = 'PMA_db';
|
||||
$_POST['table'] = 'PMA_table';
|
||||
|
||||
// when column exists in the central column list
|
||||
$GLOBALS['dbi']->expects($this->at(4))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user