summaryrefslogtreecommitdiff
path: root/actions/twitapihelp.php
diff options
context:
space:
mode:
authorzach <zach@controlyourself.ca>2008-09-30 22:09:59 -0400
committerzach <zach@controlyourself.ca>2008-09-30 22:09:59 -0400
commitdec2f29c6a77dd97383ebdbabdc0bff8e524bfa4 (patch)
treebc14f25539cfdf85adf746bb9813f2bf0b5c3370 /actions/twitapihelp.php
parentc08a67094cb848e8bcd8f631aa44adf57a33b7ab (diff)
Twitter-compatible API - Added content-type checks to several methods. Calling an API
method with a bad content type used to return a blank page. darcs-hash:20081001020959-462f3-83b0241ba7dc99c4e3a52148a46deb8182e005b0.gz
Diffstat (limited to 'actions/twitapihelp.php')
-rw-r--r--actions/twitapihelp.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/actions/twitapihelp.php b/actions/twitapihelp.php
index 2ac4178de..d2439484c 100644
--- a/actions/twitapihelp.php
+++ b/actions/twitapihelp.php
@@ -23,7 +23,7 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class TwitapihelpAction extends TwitterapiAction {
- function is_readonly() {
+ function is_readonly() {
return true;
}
@@ -32,7 +32,8 @@ class TwitapihelpAction extends TwitterapiAction {
* Formats: xml, json
*/
function test($args, $apidata) {
- global $xw;
+ parent::handle($args);
+
if ($apidata['content-type'] == 'xml') {
$this->init_document('xml');
common_element('ok', NULL, 'true');
@@ -52,5 +53,5 @@ class TwitapihelpAction extends TwitterapiAction {
common_server_error(_('API method under construction.'), $code=501);
exit();
}
-
+
} \ No newline at end of file