X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgeocode.php;h=e883c6ce4162950a4d0b0e23842cb78bbe015741;hb=ddb656fcd2a3233b26e28987d2f3425944908d30;hp=9671d2c2769f4feb615688dadf37634e1c06d3d0;hpb=4de09d6bd4eab3259d42fa846e4dd31f2516a038;p=quix0rs-gnu-social.git diff --git a/actions/geocode.php b/actions/geocode.php index 9671d2c276..e883c6ce41 100644 --- a/actions/geocode.php +++ b/actions/geocode.php @@ -42,6 +42,10 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { */ class GeocodeAction extends Action { + var $lat = null; + var $lon = null; + var $location = null; + function prepare($args) { parent::prepare($args); @@ -52,12 +56,7 @@ class GeocodeAction extends Action } $this->lat = $this->trimmed('lat'); $this->lon = $this->trimmed('lon'); - $location = Location::fromLatLon($this->lat, $this->lon); - if ($location) { - $this->location = Location::fromId($location->location_id, $location->location_ns); - $this->lat = $this->location->lat; - $this->lon = $this->location->lon; - } + $this->location = Location::fromLatLon($this->lat, $this->lon); return true; } @@ -95,4 +94,3 @@ class GeocodeAction extends Action return true; } } -?>