diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-24 16:55:49 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-24 16:55:49 -0400 |
commit | ff87732053bae38879988ba7d002a294998ccb4e (patch) | |
tree | ccccfe7fc8976baf1f0cd4438a57bf817dc4052c /lib/connectsettingsaction.php | |
parent | 27aeba01dd366f15f7847267b7518fb873987ddb (diff) | |
parent | f3cdc7f272e409d391979d3e6c58dd63573530c0 (diff) |
Merge branch '0.8.x' into testing
Conflicts:
actions/twitterauthorization.php
lib/oauthclient.php
lib/twitter.php
lib/twitterapi.php
lib/twitteroauthclient.php
scripts/twitterstatusfetcher.php
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], |