aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-17 16:11:21 -0800
committerfriendica <info@friendica.com>2014-12-17 16:11:21 -0800
commit0f0f12a4537332ee1b7ff304e53000674d159a97 (patch)
tree30c0ee54493af8c7d8983b1080f608620a9acb41 /include/text.php
parent538fc739a7bdee56c05310f7a383da712a1b3161 (diff)
downloadvolse-hubzilla-0f0f12a4537332ee1b7ff304e53000674d159a97.tar.gz
volse-hubzilla-0f0f12a4537332ee1b7ff304e53000674d159a97.tar.bz2
volse-hubzilla-0f0f12a4537332ee1b7ff304e53000674d159a97.zip
allow a variety of latitude/longitude delimiters since nobody can agree on them.
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index 335dd46ba..ee0fef262 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1307,7 +1307,9 @@ function format_filer(&$item) {
function generate_map($coord) {
- $arr = array('lat' => substr($coord,0,strpos($coord,' ')), 'lon' => substr($coord,strpos($coord,' ')+1), 'html' => '');
+ $coord = trim($coord);
+ $coord = str_replace(array(',','/',' '),array(' ',' ',' '),$coord);
+ $arr = array('lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => '');
call_hooks('generate_map',$arr);
return $arr['html'];
}