summaryrefslogtreecommitdiff
path: root/plugins/FBConnect/FBCSettingsNav.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-12 11:10:06 -0700
committerBrion Vibber <brion@pobox.com>2009-10-12 11:10:06 -0700
commit712db3a89741c423f91f43bcbeb2650d5d5d5205 (patch)
treeef260a2b132405013025f61930c3850f498318c9 /plugins/FBConnect/FBCSettingsNav.php
parent3f27f3138e88b8e52bd88ced381ea1bd5e70da89 (diff)
parentf719720e8ad3b09d664e33172bafef2b0fb91eea (diff)
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/FBConnect/FBCSettingsNav.php')
-rw-r--r--plugins/FBConnect/FBCSettingsNav.php42
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');