diff options
author | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2018-08-30 05:56:33 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2018-11-11 01:48:59 +0300 |
commit | 0fe1a3bea88a553407930f83380b88d7591d2bdd (patch) | |
tree | 2663c628a67038947641a9c0fe2167df48430eb8 /gis_data_editor.php | |
parent | 737ac997f9271d15f08b20893c9174a312027b74 (diff) |
Retrieve parameters from $_POST in GIS data editor
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'gis_data_editor.php')
-rw-r--r-- | gis_data_editor.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/gis_data_editor.php b/gis_data_editor.php index 6f438658c7..66707c83c2 100644 --- a/gis_data_editor.php +++ b/gis_data_editor.php @@ -27,14 +27,14 @@ function escape($variable) require_once 'libraries/common.inc.php'; -if (! isset($_REQUEST['field'])) { +if (! isset($_POST['field'])) { PhpMyAdmin\Util::checkParameters(array('field')); } // Get data if any posted $gis_data = array(); -if (Core::isValid($_REQUEST['gis_data'], 'array')) { - $gis_data = $_REQUEST['gis_data']; +if (Core::isValid($_POST['gis_data'], 'array')) { + $gis_data = $_POST['gis_data']; } $gis_types = array( @@ -50,15 +50,15 @@ $gis_types = array( // Extract type from the initial call and make sure that it's a valid one. // Extract from field's values if available, if not use the column type passed. if (! isset($gis_data['gis_type'])) { - if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') { - $gis_data['gis_type'] = mb_strtoupper($_REQUEST['type']); + if (isset($_POST['type']) && $_POST['type'] != '') { + $gis_data['gis_type'] = mb_strtoupper($_POST['type']); } - if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') { - $start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0; + if (isset($_POST['value']) && trim($_POST['value']) != '') { + $start = (substr($_POST['value'], 0, 1) == "'") ? 1 : 0; $gis_data['gis_type'] = mb_substr( - $_REQUEST['value'], + $_POST['value'], $start, - mb_strpos($_REQUEST['value'], "(") - $start + mb_strpos($_POST['value'], "(") - $start ); } if ((! isset($gis_data['gis_type'])) @@ -71,9 +71,9 @@ $geom_type = htmlspecialchars($gis_data['gis_type']); // Generate parameters from value passed. $gis_obj = GisFactory::factory($geom_type); -if (isset($_REQUEST['value'])) { +if (isset($_POST['value'])) { $gis_data = array_merge( - $gis_data, $gis_obj->generateParams($_REQUEST['value']) + $gis_data, $gis_obj->generateParams($_POST['value']) ); } @@ -98,7 +98,7 @@ $open_layers = GisVisualization::getByData($data, $visualizationSettings) ->asOl(); // If the call is to update the WKT and visualization make an AJAX response -if (isset($_REQUEST['generate']) && $_REQUEST['generate'] == true) { +if (isset($_POST['generate']) && $_POST['generate'] == true) { $extra_data = array( 'result' => $result, 'visualization' => $visualization, @@ -119,17 +119,17 @@ echo '<div id="gis_data_editor">'; echo '<h3>'; printf( __('Value for the column "%s"'), - htmlspecialchars($_REQUEST['field']) + htmlspecialchars($_POST['field']) ); echo '</h3>'; echo '<input type="hidden" name="field" value="' - , htmlspecialchars($_REQUEST['field']) , '" />'; + , htmlspecialchars($_POST['field']) , '" />'; // The input field to which the final result should be added // and corresponding null checkbox -if (isset($_REQUEST['input_name'])) { +if (isset($_POST['input_name'])) { echo '<input type="hidden" name="input_name" value="' - , htmlspecialchars($_REQUEST['input_name']) , '" />'; + , htmlspecialchars($_POST['input_name']) , '" />'; } echo Url::getHiddenInputs(); |