]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move XRDS code from public action to OpenIDPlugin
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:04:31 +0000 (13:04 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:04:31 +0000 (13:04 -0400)
actions/public.php
plugins/OpenID/OpenIDPlugin.php

index d0317ac70660c7dcf5a3f1a02fc59c65b2d7fe97..322a52963e8da6d6198957e61caea251dab5e0b8 100644 (file)
@@ -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 <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
      *
index fb6bc5cf8ead1822e5cf7e7de7729a922a6f9355..a395f910772bfb3eca78eb555fcf79491c5d6493 100644 (file)
@@ -142,4 +142,18 @@ class OpenIDPlugin extends Plugin
             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')));
+    }
 }