diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2011-07-31 21:44:43 +0400 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2011-07-31 21:44:43 +0400 |
commit | f00b473c17bce475816f0be84b48f572f404fbb5 (patch) | |
tree | 8d5f5a6c4c7d6cd713042963529e121e20ad9ee9 /gis_data_editor.php | |
parent | e62c03f7a5b153ec7524157a7ec8878f46ce0162 (diff) |
Accept WKTs without SRID
Diffstat (limited to 'gis_data_editor.php')
-rw-r--r-- | gis_data_editor.php | 3 |
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]; |