Ticket #925 - make verify_credentials return 'Authorized' if no return type specified
This commit is contained in:
parent
b9f3e1e01e
commit
cdab8d55a9
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user