Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-06-16 14:03:43 +0300
committerMichal Čihař <michal@cihar.com>2016-06-16 14:03:43 +0300
commite0a37a7ba0be59602adeb84edb4ca17f53e23789 (patch)
tree140b8447fb454bbbf99dc6e44ecb3d6d2885c196 /gis_data_editor.php
parent75d70119ed6bce39852a6b03189ef6ad53903f00 (diff)
parent53cc34b374ffe7aefab514dc77042d89596705e7 (diff)
Merge branch 'QA_4_6'
Diffstat (limited to 'gis_data_editor.php')
-rw-r--r--gis_data_editor.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/gis_data_editor.php b/gis_data_editor.php
index 8f710703d8..2d3002081c 100644
--- a/gis_data_editor.php
+++ b/gis_data_editor.php
@@ -64,7 +64,7 @@ if (! isset($gis_data['gis_type'])) {
$gis_data['gis_type'] = $gis_types[0];
}
}
-$geom_type = $gis_data['gis_type'];
+$geom_type = htmlspecialchars($gis_data['gis_type']);
// Generate parameters from value passed.
$gis_obj = GISFactory::factory($geom_type);
@@ -176,7 +176,7 @@ echo '<div id="gis_data">';
$geom_count = 1;
if ($geom_type == 'GEOMETRYCOLLECTION') {
$geom_count = (isset($gis_data[$geom_type]['geom_count']))
- ? $gis_data[$geom_type]['geom_count'] : 1;
+ ? intval($gis_data[$geom_type]['geom_count']) : 1;
if (isset($gis_data[$geom_type]['add_geom'])) {
$geom_count++;
}
@@ -223,7 +223,7 @@ for ($a = 0; $a < $geom_count; $a++) {
} elseif ($type == 'MULTIPOINT' || $type == 'LINESTRING') {
$no_of_points = isset($gis_data[$a][$type]['no_of_points'])
- ? $gis_data[$a][$type]['no_of_points'] : 1;
+ ? intval($gis_data[$a][$type]['no_of_points']) : 1;
if ($type == 'LINESTRING' && $no_of_points < 2) {
$no_of_points = 2;
}
@@ -256,7 +256,7 @@ for ($a = 0; $a < $geom_count; $a++) {
} elseif ($type == 'MULTILINESTRING' || $type == 'POLYGON') {
$no_of_lines = isset($gis_data[$a][$type]['no_of_lines'])
- ? $gis_data[$a][$type]['no_of_lines'] : 1;
+ ? intval($gis_data[$a][$type]['no_of_lines']) : 1;
if ($no_of_lines < 1) {
$no_of_lines = 1;
}
@@ -279,7 +279,7 @@ for ($a = 0; $a < $geom_count; $a++) {
}
$no_of_points = isset($gis_data[$a][$type][$i]['no_of_points'])
- ? $gis_data[$a][$type][$i]['no_of_points'] : 2;
+ ? intval($gis_data[$a][$type][$i]['no_of_points']) : 2;
if ($type == 'MULTILINESTRING' && $no_of_points < 2) {
$no_of_points = 2;
}
@@ -320,7 +320,7 @@ for ($a = 0; $a < $geom_count; $a++) {
} elseif ($type == 'MULTIPOLYGON') {
$no_of_polygons = isset($gis_data[$a][$type]['no_of_polygons'])
- ? $gis_data[$a][$type]['no_of_polygons'] : 1;
+ ? intval($gis_data[$a][$type]['no_of_polygons']) : 1;
if ($no_of_polygons < 1) {
$no_of_polygons = 1;
}
@@ -335,7 +335,7 @@ for ($a = 0; $a < $geom_count; $a++) {
echo '<br/>';
printf(__('Polygon %d:'), $k + 1);
$no_of_lines = isset($gis_data[$a][$type][$k]['no_of_lines'])
- ? $gis_data[$a][$type][$k]['no_of_lines'] : 1;
+ ? intval($gis_data[$a][$type][$k]['no_of_lines')] : 1;
if ($no_of_lines < 1) {
$no_of_lines = 1;
}
@@ -355,7 +355,7 @@ for ($a = 0; $a < $geom_count; $a++) {
}
$no_of_points = isset($gis_data[$a][$type][$k][$i]['no_of_points'])
- ? $gis_data[$a][$type][$k][$i]['no_of_points'] : 4;
+ ? intval($gis_data[$a][$type][$k][$i]['no_of_points']) : 4;
if ($no_of_points < 4) {
$no_of_points = 4;
}
@@ -420,7 +420,7 @@ echo __(
);
echo '</p>';
echo '<textarea id="gis_data_textarea" cols="95" rows="5">';
-echo $result;
+echo htmlspecialchars($result);
echo '</textarea>';
echo '</div>';