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:
authorMadhura Jayaratne <madhura.cj@gmail.com>2011-07-31 21:44:43 +0400
committerMadhura Jayaratne <madhura.cj@gmail.com>2011-07-31 21:44:43 +0400
commitf00b473c17bce475816f0be84b48f572f404fbb5 (patch)
tree8d5f5a6c4c7d6cd713042963529e121e20ad9ee9 /gis_data_editor.php
parente62c03f7a5b153ec7524157a7ec8878f46ce0162 (diff)
Accept WKTs without SRID
Diffstat (limited to 'gis_data_editor.php')
-rw-r--r--gis_data_editor.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/gis_data_editor.php b/gis_data_editor.php
index e93bfe9c30..c4842b2b9e 100644
--- a/gis_data_editor.php
+++ b/gis_data_editor.php
@@ -30,7 +30,8 @@ if (! isset($gis_data['gis_type'])) {
$gis_data['gis_type'] = strtoupper($_REQUEST['type']);
}
if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') {
- $gis_data['gis_type'] = substr($_REQUEST['value'], 1, strpos($_REQUEST['value'], "(") - 1);
+ $start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
+ $gis_data['gis_type'] = substr($_REQUEST['value'], $start, strpos($_REQUEST['value'], "(") - $start);
}
if(! in_array($gis_data['gis_type'], $gis_types)) {
$gis_data['gis_type'] = $gis_types[0];