From: Brion Vibber Date: Wed, 19 May 2010 19:51:25 +0000 (-0700) Subject: Merge branch 'testing' into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7005ef66617b265ddccdd9082c2368bf014a7e83;p=quix0rs-gnu-social.git Merge branch 'testing' into 0.9.x Conflicts: plugins/OpenID/openidlogin.php --- 7005ef66617b265ddccdd9082c2368bf014a7e83 diff --cc plugins/OpenID/OpenIDPlugin.php index 6b723ad10f,9eac9f6fcd..fdcfacfa5d --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@@ -199,11 -212,11 +212,11 @@@ class OpenIDPlugin extends Plugi function onStartPrimaryNav($action) { - if ($this->openidOnly && !common_logged_in()) { + if (common_config('site', 'openidonly') && !common_logged_in()) { // TRANS: Tooltip for main menu option "Login" $tooltip = _m('TOOLTIP', 'Login to the site'); - // TRANS: Main menu option when not logged in to log in $action->menuItem(common_local_url('openidlogin'), + // TRANS: Main menu option when not logged in to log in _m('MENU', 'Login'), $tooltip, false, diff --cc plugins/OpenID/openidlogin.php index ec05daeb18,8c559c9346..34e00ccceb --- a/plugins/OpenID/openidlogin.php +++ b/plugins/OpenID/openidlogin.php @@@ -27,10 -27,14 +27,15 @@@ class OpenidloginAction extends Actio { parent::handle($args); if (common_is_real_login()) { + // TRANS: Client error message trying to log on with OpenID while already logged on. $this->clientError(_m('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { - $openid_url = $this->trimmed('openid_url'); + $provider = common_config('openid', 'trusted_provider'); + if ($provider) { + $openid_url = $provider; + } else { + $openid_url = $this->trimmed('openid_url'); + } oid_assert_allowed($openid_url); @@@ -124,16 -121,21 +129,25 @@@ $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - // TRANS: OpenID plugin logon form field label. - $this->input('openid_url', _m('OpenID URL'), - $this->openid_url, - // TRANS: OpenID plugin logon form field instructions. - _m('Your OpenID URL')); + $provider = common_config('openid', 'trusted_provider'); + if ($provider) { + $this->element('label', array(), _m('OpenID provider')); + $this->element('span', array(), $provider); + $this->element('p', 'form_guide', + _m('You will be sent to the provider\'s site for authentication.')); + $this->hidden('openid_url', $provider); + } else { ++ // TRANS: OpenID plugin logon form field label. + $this->input('openid_url', _m('OpenID URL'), + $this->openid_url, ++ // TRANS: OpenID plugin logon form field instructions. + _m('Your OpenID URL')); + } $this->elementEnd('li'); $this->elementStart('li', array('id' => 'settings_rememberme')); + // TRANS: OpenID plugin logon form checkbox label for setting to put the OpenID information in a cookie. $this->checkbox('rememberme', _m('Remember me'), false, + // TRANS: OpenID plugin logon form field instructions. _m('Automatically login in the future; ' . 'not for shared computers!')); $this->elementEnd('li');