X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOpenID%2Fopenidlogin.php;h=9ba55911c014c8afa156e16ce71b7fb33610ba3d;hb=b5b5184c885e74d9532409a5962f851c4baf41c4;hp=a8d052096ca470712c43b78e0a2988c6546a5605;hpb=2b79b4d21fa33844911f28b9e33ec958cbac3de9;p=quix0rs-gnu-social.git diff --git a/plugins/OpenID/openidlogin.php b/plugins/OpenID/openidlogin.php index a8d052096c..9ba55911c0 100644 --- a/plugins/OpenID/openidlogin.php +++ b/plugins/OpenID/openidlogin.php @@ -1,7 +1,7 @@ . */ -if (!defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once(INSTALLDIR.'/lib/openid.php'); +require_once INSTALLDIR.'/plugins/OpenID/openid.php'; class OpenidloginAction extends Action { @@ -27,14 +27,14 @@ class OpenidloginAction extends Action { parent::handle($args); if (common_is_real_login()) { - $this->clientError(_('Already logged in.')); + $this->clientError(_m('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $openid_url = $this->trimmed('openid_url'); # CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { - $this->showForm(_('There was a problem with your session token. Try again, please.'), $openid_url); + $this->showForm(_m('There was a problem with your session token. Try again, please.'), $openid_url); return; } @@ -63,11 +63,11 @@ class OpenidloginAction extends Action common_get_returnto()) { // rememberme logins have to reauthenticate before // changing any profile settings (cookie-stealing protection) - return _('For security reasons, please re-login with your ' . + return _m('For security reasons, please re-login with your ' . '[OpenID](%%doc.openid%%) ' . 'before changing your settings.'); } else { - return _('Login with an [OpenID](%%doc.openid%%) account.'); + return _m('Login with an [OpenID](%%doc.openid%%) account.'); } } @@ -84,9 +84,15 @@ class OpenidloginAction extends Action } } + function showScripts() + { + parent::showScripts(); + $this->autofocus('openid_url'); + } + function title() { - return _('OpenID Login'); + return _m('OpenID Login'); } function showForm($error=null, $openid_url) @@ -103,22 +109,22 @@ class OpenidloginAction extends Action 'class' => 'form_settings', 'action' => $formaction)); $this->elementStart('fieldset'); - $this->element('legend', null, _('OpenID login')); + $this->element('legend', null, _m('OpenID login')); $this->hidden('token', common_session_token()); $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('openid_url', _('OpenID URL'), + $this->input('openid_url', _m('OpenID URL'), $this->openid_url, - _('Your OpenID URL')); + _m('Your OpenID URL')); $this->elementEnd('li'); $this->elementStart('li', array('id' => 'settings_rememberme')); - $this->checkbox('rememberme', _('Remember me'), false, - _('Automatically login in the future; ' . + $this->checkbox('rememberme', _m('Remember me'), false, + _m('Automatically login in the future; ' . 'not for shared computers!')); $this->elementEnd('li'); $this->elementEnd('ul'); - $this->submit('submit', _('Login')); + $this->submit('submit', _m('Login')); $this->elementEnd('fieldset'); $this->elementEnd('form'); }