diff options
author | Evan Prodromou <evan@status.net> | 2009-12-28 15:49:27 -0800 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-28 15:49:27 -0800 |
commit | e119362fde9eabb27d48c94a98624aeae68e436c (patch) | |
tree | 04d2e1fb5e1b2a5b64c4d0ef12b532397ec0a331 /actions/apistatusesupdate.php | |
parent | 98a579fedf36ff795e255a4b345651df0ee230bc (diff) | |
parent | ca6669538a16f36f92df918d679671b95b1859ac (diff) |
Merge branch 'locshunt' into 0.9.x
Diffstat (limited to 'actions/apistatusesupdate.php')
-rw-r--r-- | actions/apistatusesupdate.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php index dabbea92f..f594bbf39 100644 --- a/actions/apistatusesupdate.php +++ b/actions/apistatusesupdate.php @@ -203,12 +203,6 @@ class ApiStatusesUpdateAction extends ApiAuthAction } } - $location = null; - - if (!empty($this->lat) && !empty($this->lon)) { - $location = Location::fromLatLon($this->lat, $this->lon); - } - $upload = null; try { @@ -235,11 +229,15 @@ class ApiStatusesUpdateAction extends ApiAuthAction $options = array('reply_to' => $reply_to); - if (!empty($location)) { - $options['lat'] = $location->lat; - $options['lon'] = $location->lon; - $options['location_id'] = $location->location_id; - $options['location_ns'] = $location->location_ns; + if ($this->user->shareLocation()) { + + $locOptions = Notice::locationOptions($this->lat, + $this->lon, + null, + null, + $this->user->getProfile()); + + $options = array_merge($options, $locOptions); } $this->notice = |