We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit cdab8d55 authored by Zach Copley's avatar Zach Copley

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

parent b9f3e1e0
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment