]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move openid instructions to OpenIDPlugin
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:27:22 +0000 (13:27 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:27:22 +0000 (13:27 -0400)
actions/login.php
actions/register.php
plugins/OpenID/OpenIDPlugin.php

index 50de83f6fb2574dc2627c2c3b87da9785110ba3a..f5a658bf503b2bf3f49a46de4b6bed6a6363a053 100644 (file)
@@ -250,8 +250,7 @@ class LoginAction extends Action
         } else {
             return _('Login with your username and password. ' .
                      'Don\'t have a username yet? ' .
-                     '[Register](%%action.register%%) a new account, or ' .
-                     'try [OpenID](%%action.openidlogin%%). ');
+                     '[Register](%%action.register%%) a new account.');
         }
     }
 
index dcbbbdb6a6de9afb238715b7ff1cac3d78f40b7d..dd3edc4ed3948d1b37ada04a9c4ea687af33ee10 100644 (file)
@@ -329,10 +329,7 @@ class RegisterAction extends Action
               common_markup_to_html(_('With this form you can create '.
                                       ' a new account. ' .
                                       'You can then post notices and '.
-                                      'link up to friends and colleagues. '.
-                                      '(Have an [OpenID](http://openid.net/)? ' .
-                                      'Try our [OpenID registration]'.
-                                      '(%%action.openidlogin%%)!)'));
+                                      'link up to friends and colleagues. '));
 
             $this->elementStart('div', 'instructions');
             $this->raw($instr);
index ec261d7f7f8eddb792a1ba7ca1f819a444e6671e..87b25d42a5eab08d49db92a636579028ee2e8c43 100644 (file)
@@ -171,4 +171,29 @@ class OpenIDPlugin extends Plugin
         }
         return true;
     }
+
+    function onEndShowPageNotice($action)
+    {
+        $name = $action->trimmed('action');
+
+        switch ($name)
+        {
+         case 'register':
+            $instr = '(Have an [OpenID](http://openid.net/)? ' .
+              'Try our [OpenID registration]'.
+              '(%%action.openidlogin%%)!)';
+            break;
+         case 'login':
+            $instr = '(Have an [OpenID](http://openid.net/)? ' .
+              'Try our [OpenID login]'.
+              '(%%action.openidlogin%%)!)';
+            break;
+         default:
+            return true;
+        }
+
+        $output = common_markup_to_html($instr);
+        $action->raw($output);
+        return true;
+    }
 }