diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-06 22:38:06 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-06 22:38:06 -0400 |
commit | 1c3a1360a9bde9bd916df8a2e064438d3ef600e7 (patch) | |
tree | 775668662785556b7d79209b9cc453368d04c053 /lib/connectsettingsaction.php | |
parent | 49eb6009a54e9fd5609cce1ba7cfc9d85edff8c0 (diff) | |
parent | 7c9e12a0b8117809d559e1120b5f4f0cf578e646 (diff) |
Merge commit 'jeff-themovie/0.8.x-subsystems-enabled' into 0.8.x
Diffstat (limited to 'lib/connectsettingsaction.php')
-rw-r--r-- | lib/connectsettingsaction.php | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/connectsettingsaction.php b/lib/connectsettingsaction.php index 30629680e..02c468a35 100644 --- a/lib/connectsettingsaction.php +++ b/lib/connectsettingsaction.php @@ -99,25 +99,27 @@ class ConnectSettingsNav extends Widget function show() { # 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'))); + $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')); + } $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], |