*
* @return boolean success flag
*/
- function prepare($args)
+ function prepare(array $args = array())
{
parent::prepare($args);
// Permanent redirect on non-canonical nickname
if ($nickname_arg != $nickname) {
- common_redirect(common_local_url('rsd',
- array('nickname' => $nickname)),
- 301);
- return false;
+ common_redirect(common_local_url('rsd', array('nickname' => $nickname)), 301);
}
- $this->user = User::staticGet('nickname', $nickname);
+ $this->user = User::getKV('nickname', $nickname);
if (empty($this->user)) {
+ // TRANS: Client error.
$this->clientError(_('No such user.'), 404);
- return false;
}
}
*
* @return nothing
*/
- function handle($args)
+ function handle()
{
header('Content-Type: application/rsd+xml');
$this->elementStart('rsd', array('version' => '1.0',
'xmlns' => $rsdNS));
$this->elementStart('service');
+ // TRANS: Engine name for RSD.
$this->element('engineName', null, _('StatusNet'));
$this->element('engineLink', null, 'http://status.net/');
$this->elementStart('apis');
$this->elementStart('api', $apiAttrs);
$this->elementStart('settings');
$this->element('docs', null,
- 'http://status.net/wiki/TwitterCompatibleAPI');
+ common_local_url('doc', array('title' => 'api')));
$this->element('setting', array('name' => 'OAuth'),
'true');
$this->elementEnd('settings');