Ticket #925 - make verify_credentials return 'Authorized' if no return type specified

This commit is contained in:
Zach Copley 2009-02-22 17:01:41 -08:00
parent b9f3e1e01e
commit cdab8d55a9

View File

@ -24,20 +24,19 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class TwitapiaccountAction extends TwitterapiAction
{
function verify_credentials($args, $apidata)
function verify_credentials($args, $apidata)
{
if ($apidata['content-type'] == 'xml') {
header('Content-Type: application/xml; charset=utf-8');
print '<authorized>true</authorized>';
} elseif ($apidata['content-type'] == 'json') {
header('Content-Type: application/json; charset=utf-8');
print '{"authorized":true}';
} else {
common_user_error(_('API method not found!'), $code=404);
}
}
if ($apidata['content-type'] == 'xml') {
header('Content-Type: application/xml; charset=utf-8');
print '<authorized>true</authorized>';
} elseif ($apidata['content-type'] == 'json') {
header('Content-Type: application/json; charset=utf-8');
print '{"authorized":true}';
} else {
header('Content-Type: text/html; charset=utf-8');
print 'Authorized';
}
}
function end_session($args, $apidata)
{