From 2ed46ce274c3b404fdf75aacafa5d5fa7a807240 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 4 Aug 2009 13:04:31 -0400 Subject: [PATCH] move XRDS code from public action to OpenIDPlugin --- actions/public.php | 18 ------------------ plugins/OpenID/OpenIDPlugin.php | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/actions/public.php b/actions/public.php index d0317ac706..322a52963e 100644 --- a/actions/public.php +++ b/actions/public.php @@ -101,8 +101,6 @@ class PublicAction extends Action { parent::handle($args); - header('X-XRDS-Location: '. common_local_url('publicxrds')); - $this->showPage(); } @@ -143,22 +141,6 @@ class PublicAction extends Action _('Public Stream Feed (Atom)'))); } - /** - * Extra head elements - * - * We include a 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 * diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index fb6bc5cf8e..a395f91077 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -142,4 +142,18 @@ class OpenIDPlugin extends Plugin return true; } } + + /** + * We include a 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'))); + } } -- 2.39.5