From dcf9036315dd86432ba0a9c661a0a878c1d11333 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 9 Mar 2010 09:57:31 +0000 Subject: [PATCH] 2010-03-09 Miguel de Dios * godmode/gis_maps/configure_gis_map.php: fix the request var when it is activate magic quotes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2493 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/gis_maps/configure_gis_map.php | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 390bc4d7c6..33f20feb22 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-03-09 Miguel de Dios + + * godmode/gis_maps/configure_gis_map.php: fix the request var when it is + activate magic quotes. + 2010-03-09 Junichi Satoh * include/help/ja : Imported Japanese help files. diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index 6b08e4c005..0c50cdd8a5 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -22,6 +22,8 @@ print_page_header (__('GIS Maps builder'), "images/server_web.png", false, "conf require_once ('include/functions_gis.php'); +$magicQuotesFlag = (boolean)ini_get('magic_quotes_gpc'); + require_javascript_file('openlayers.pandora'); //Global vars for javascript and scripts. ?> @@ -131,7 +133,13 @@ switch ($action) { $arrayLayers = array(); foreach ($layer_list as $layerID) { - $arrayLayers[] = JSON_decode($_POST['layer_values_' . $layerID], true); + if ($magicQuotesFlag) { + $layer = stripslashes($_POST['layer_values_' . $layerID]); + } + else { + $layer = $_POST['layer_values_' . $layerID]; + } + $arrayLayers[] = JSON_decode($layer, true); } $invalidFields = validateMapData($map_name, $map_zoom_level,