diff options
author | Brion Vibber <brion@pobox.com> | 2010-11-15 12:38:53 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-11-15 12:38:53 -0800 |
commit | 5c00848b74ff262a1f36efc17f1f44580d3ee313 (patch) | |
tree | ec79d3191be24ee9d254e410c02c7b49c0e7dc77 /lib | |
parent | e317ec11ad470fe57dc12c0bde1566abde1c036a (diff) | |
parent | d038d0fa465f76395f8e341a04a64661b631c122 (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r-- | lib/action.php | 11 | ||||
-rw-r--r-- | lib/apiaction.php | 6 | ||||
-rw-r--r-- | lib/router.php | 11 |
3 files changed, 26 insertions, 2 deletions
diff --git a/lib/action.php b/lib/action.php index 427b85427..17d3e2311 100644 --- a/lib/action.php +++ b/lib/action.php @@ -1404,4 +1404,15 @@ class Action extends HTMLOutputter // lawsuit $this->clientError(_('There was a problem with your session token.')); } } + + /** + * Check if the current request is a POST + * + * @return boolean true if POST; otherwise false. + */ + + function isPost() + { + return ($_SERVER['REQUEST_METHOD'] == 'POST'); + } } diff --git a/lib/apiaction.php b/lib/apiaction.php index 4e9dbb310..8a7be3150 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -726,6 +726,12 @@ class ApiAction extends Action $this->endDocument('xml'); } + function showSingleAtomStatus($notice) + { + header('Content-Type: application/atom+xml; charset=utf-8'); + print $notice->asAtomEntry(true, true, true, $this->auth_user); + } + function show_single_json_status($notice) { $this->initDocument('json'); diff --git a/lib/router.php b/lib/router.php index 9aaac7dfe..c0f3bf31d 100644 --- a/lib/router.php +++ b/lib/router.php @@ -399,12 +399,12 @@ class Router $m->connect('api/statuses/show.:format', array('action' => 'ApiStatusesShow', - 'format' => '(xml|json)')); + 'format' => '(xml|json|atom)')); $m->connect('api/statuses/show/:id.:format', array('action' => 'ApiStatusesShow', 'id' => '[0-9]+', - 'format' => '(xml|json)')); + 'format' => '(xml|json|atom)')); $m->connect('api/statuses/update.:format', array('action' => 'ApiStatusesUpdate', @@ -686,6 +686,13 @@ class Router $m->connect('api/oauth/authorize', array('action' => 'ApiOauthAuthorize')); + $m->connect('api/statusnet/app/service/:id.xml', + array('action' => 'ApiAtomService', + 'id' => '[a-zA-Z0-9]+')); + + $m->connect('api/statusnet/app/service.xml', + array('action' => 'ApiAtomService')); + // Admin $m->connect('admin/site', array('action' => 'siteadminpanel')); |