X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgeocode.php;h=d934930608fa448a0d73ffbe554737c41d78f7f9;hb=a93f0fea618f189cedd0093f77437369d306db95;hp=9671d2c2769f4feb615688dadf37634e1c06d3d0;hpb=a180658a3bfcf2b7b312058e3aa76e0e2467c2f8;p=quix0rs-gnu-social.git diff --git a/actions/geocode.php b/actions/geocode.php index 9671d2c276..d934930608 100644 --- a/actions/geocode.php +++ b/actions/geocode.php @@ -37,11 +37,16 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @category Action * @package StatusNet * @author Craig Andrews + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ class GeocodeAction extends Action { + var $lat = null; + var $lon = null; + var $location = null; + function prepare($args) { parent::prepare($args); @@ -52,12 +57,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 +95,3 @@ class GeocodeAction extends Action return true; } } -?>