move XRDS code from public action to OpenIDPlugin

This commit is contained in:
Evan Prodromou 2009-08-04 13:04:31 -04:00
parent 628a937108
commit 2ed46ce274
2 changed files with 14 additions and 18 deletions

View File

@ -101,8 +101,6 @@ class PublicAction extends Action
{ {
parent::handle($args); parent::handle($args);
header('X-XRDS-Location: '. common_local_url('publicxrds'));
$this->showPage(); $this->showPage();
} }
@ -143,22 +141,6 @@ class PublicAction extends Action
_('Public Stream Feed (Atom)'))); _('Public Stream Feed (Atom)')));
} }
/**
* Extra head elements
*
* We include a <meta> element linking to the publicxrds page, for OpenID
* client-side authentication.
*
* @return void
*/
function extraHead()
{
// for client side of OpenID authentication
$this->element('meta', array('http-equiv' => 'X-XRDS-Location',
'content' => common_local_url('publicxrds')));
}
/** /**
* Show tabset for this page * Show tabset for this page
* *

View File

@ -142,4 +142,18 @@ class OpenIDPlugin extends Plugin
return true; return true;
} }
} }
/**
* We include a <meta> element linking to the publicxrds page, for OpenID
* client-side authentication.
*
* @return void
*/
function onEndHeadChildren($action)
{
// for client side of OpenID authentication
$action->element('meta', array('http-equiv' => 'X-XRDS-Location',
'content' => common_local_url('publicxrds')));
}
} }