diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-10-11 13:17:59 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-10-11 13:17:59 -0400 |
commit | 1f21e5ee79a2ce9da3d4d499565ba5412bd3b1f0 (patch) | |
tree | 03b1cb3bfea6ed1786687a44798af0fe9c4d6448 /plugins/FBConnect/FBCSettingsNav.php | |
parent | e9d7f18f0c2ad05c0203bc347a74c0f69e497566 (diff) | |
parent | c597aba342c2d4bd7ee53dc471d6b7deafb62a5e (diff) |
Merge commit 'refs/merge-requests/1738' of git://gitorious.org/statusnet/mainline into 0.8.x
Diffstat (limited to 'plugins/FBConnect/FBCSettingsNav.php')
-rw-r--r-- | plugins/FBConnect/FBCSettingsNav.php | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/plugins/FBConnect/FBCSettingsNav.php b/plugins/FBConnect/FBCSettingsNav.php index 29724d6bd..ed02371e2 100644 --- a/plugins/FBConnect/FBCSettingsNav.php +++ b/plugins/FBConnect/FBCSettingsNav.php @@ -77,32 +77,34 @@ class FBCSettingsNav extends Widget $this->action->elementStart('dd'); # action => array('prompt', 'title') - $menu = - array('imsettings' => - array(_('IM'), - _('Updates by instant messenger (IM)')), - 'smssettings' => - array(_('SMS'), - _('Updates by SMS')), - 'twittersettings' => - array(_('Twitter'), - _('Twitter integration options')), - 'FBConnectSettings' => - array(_('Facebook'), - _('Facebook Connect settings'))); + $menu = array(); + if (common_config('xmpp', 'enabled')) { + $menu['imsettings'] = + array(_('IM'), + _('Updates by instant messenger (IM)')); + } + if (common_config('sms', 'enabled')) { + $menu['smssettings'] = + array(_('SMS'), + _('Updates by SMS')); + } + if (common_config('twitter', 'enabled')) { + $menu['twittersettings'] = + array(_('Twitter'), + _('Twitter integration options')); + } + $menu['FBConnectSettings'] = + array(_('Facebook'), + _('Facebook Connect settings')); $action_name = $this->action->trimmed('action'); $this->action->elementStart('ul', array('class' => 'nav')); foreach ($menu as $menuaction => $menudesc) { - if ($menuaction == 'imsettings' && - !common_config('xmpp', 'enabled')) { - continue; - } $this->action->menuItem(common_local_url($menuaction), - $menudesc[0], - $menudesc[1], - $action_name === $menuaction); + $menudesc[0], + $menudesc[1], + $action_name === $menuaction); } $this->action->elementEnd('ul'); |