diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-11 07:30:26 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-11 07:30:26 -0700 |
commit | 55415652382d1f3ae77123d197e01d95da83041e (patch) | |
tree | 449ee7e9aebe184583f099e49a7194eb5bbf8543 /actions/twitapistatuses.php | |
parent | bfae5489cb629331f2936b2bf1066adb3976bce1 (diff) | |
parent | 7621e0e38467349a89f71e814941932fbacecfa1 (diff) |
Merge branch 'testing'
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r-- | actions/twitapistatuses.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index 555c746cb..c9943698d 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -373,9 +373,19 @@ class TwitapistatusesAction extends TwitterapiAction return; } + // 'id' is an undocumented parameter in Twitter's API. Several + // clients make use of it, so we support it too. + + // show.json?id=12345 takes precedence over /show/12345.json + $this->auth_user = $apidata['user']; - $notice_id = $apidata['api_arg']; - $notice = Notice::staticGet($notice_id); + $notice_id = $this->trimmed('id'); + + if (empty($notice_id)) { + $notice_id = $apidata['api_arg']; + } + + $notice = Notice::staticGet((int)$notice_id); if ($notice) { if ($apidata['content-type'] == 'xml') { @@ -389,7 +399,6 @@ class TwitapistatusesAction extends TwitterapiAction $this->clientError(_('No status with that ID found.'), 404, $apidata['content-type']); } - } function destroy($args, $apidata) |