diff options
author | Evan Prodromou <evan@status.net> | 2009-12-11 11:38:08 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-11 11:38:08 -0500 |
commit | 60754fc6de8f73b3e74dbec30d91fffe11b094c6 (patch) | |
tree | 168dff88fe89417b22cd28efbde54b36b018407c /actions/apistatusesupdate.php | |
parent | 81843f2acd5375a9072d091fd58c6a6af079295e (diff) | |
parent | 89256fa754c1e03b822b8eeac388cc822b3c58ca (diff) |
Merge branch '0.9.x' into forward
Diffstat (limited to 'actions/apistatusesupdate.php')
-rw-r--r-- | actions/apistatusesupdate.php | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php index 85a7c8c08..dabbea92f 100644 --- a/actions/apistatusesupdate.php +++ b/actions/apistatusesupdate.php @@ -231,19 +231,22 @@ class ApiStatusesUpdateAction extends ApiAuthAction } } - $this->notice = Notice::saveNew( - $this->user->id, - html_entity_decode($status_shortened, ENT_NOQUOTES, 'UTF-8'), - $this->source, - 1, - $reply_to, - null, - null, - empty($location) ? null : $location->lat, - empty($location) ? null : $location->lon, - empty($location) ? null : $location->location_id, - empty($location) ? null : $location->location_ns - ); + $content = html_entity_decode($status_shortened, ENT_NOQUOTES, 'UTF-8'); + + $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; + } + + $this->notice = + Notice::saveNew($this->user->id, + $content, + $this->source, + $options); if (isset($upload)) { $upload->attachToNotice($this->notice); |