diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-16 19:50:37 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-16 19:50:37 -0400 |
commit | 136a69a387719d560f97b6f8ee73d1224b2bac8c (patch) | |
tree | e9c0c02d89119a9d8c35b2d0c2485d8d888a65f4 /lib | |
parent | 46c77b83b1b10663ac80f6e1df604d529bb31dd4 (diff) | |
parent | 75a0a3e18b001454ab4844bc63d4052faf502138 (diff) |
Merge commit 'jeff-themovie/0.8.x-openid-enabled' into 0.8.x
Diffstat (limited to 'lib')
-rw-r--r-- | lib/accountsettingsaction.php | 4 | ||||
-rw-r--r-- | lib/common.php | 8 | ||||
-rw-r--r-- | lib/logingroupnav.php | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/lib/accountsettingsaction.php b/lib/accountsettingsaction.php index 4ab50abce..1a21d871e 100644 --- a/lib/accountsettingsaction.php +++ b/lib/accountsettingsaction.php @@ -126,6 +126,10 @@ class AccountSettingsNav extends Widget $this->action->elementStart('ul', array('class' => 'nav')); foreach ($menu as $menuaction => $menudesc) { + if ($menuaction == 'openidsettings' && + !common_config('openid', 'enabled')) { + continue; + } $this->action->menuItem(common_local_url($menuaction), $menudesc[0], $menudesc[1], diff --git a/lib/common.php b/lib/common.php index f26155e70..3fc047af9 100644 --- a/lib/common.php +++ b/lib/common.php @@ -170,6 +170,8 @@ $config = 'host' => null, # only set if != server 'debug' => false, # print extra debug info 'public' => array()), # JIDs of users who want to receive the public stream + 'openid' => + array('enabled' => true), 'invite' => array('enabled' => true), 'sphinx' => @@ -371,6 +373,12 @@ if ($_db_name != 'laconica' && !array_key_exists('ini_'.$_db_name, $config['db'] $config['db']['ini_'.$_db_name] = INSTALLDIR.'/classes/laconica.ini'; } +// Ignore openidonly if OpenID is disabled + +if (!$config['openid']['enabled']) { + $config['site']['openidonly'] = false; +} + // XXX: how many of these could be auto-loaded on use? require_once 'Validate.php'; diff --git a/lib/logingroupnav.php b/lib/logingroupnav.php index 919fd3db9..2fb1828d6 100644 --- a/lib/logingroupnav.php +++ b/lib/logingroupnav.php @@ -80,8 +80,10 @@ class LoginGroupNav extends Widget _('Sign up for a new account')); } } - $menu['openidlogin'] = array(_('OpenID'), - _('Login or register with OpenID')); + if (common_config('openid', 'enabled')) { + $menu['openidlogin'] = array(_('OpenID'), + _('Login or register with OpenID')); + } $action_name = $this->action->trimmed('action'); $this->action->elementStart('ul', array('class' => 'nav')); |