diff options
author | Brenda Wallace <shiny@cpan.org> | 2009-12-12 22:47:12 +0000 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2009-12-12 22:47:12 +0000 |
commit | 9d3829df9d29581c1d0281e57fda8ba4452ce2c2 (patch) | |
tree | a196e99a9de45a982b76f5c4cef24b7dfc57d21b /actions/apistatusesupdate.php | |
parent | a5c11cc92a277c3af6f9b18b1ffaf6dc5f90f5cc (diff) | |
parent | 438a0d7f1c23d176f380d6f5dba181ec54722b83 (diff) |
Merge commit 'origin/0.9.x' into 0.9.x
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); |