summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-06 22:38:06 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-06 22:38:06 -0400
commit1c3a1360a9bde9bd916df8a2e064438d3ef600e7 (patch)
tree775668662785556b7d79209b9cc453368d04c053 /lib
parent49eb6009a54e9fd5609cce1ba7cfc9d85edff8c0 (diff)
parent7c9e12a0b8117809d559e1120b5f4f0cf578e646 (diff)
Merge commit 'jeff-themovie/0.8.x-subsystems-enabled' into 0.8.x
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php17
-rw-r--r--lib/common.php6
-rw-r--r--lib/connectsettingsaction.php30
3 files changed, 33 insertions, 20 deletions
diff --git a/lib/action.php b/lib/action.php
index 1c6170693..326edf3a0 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -402,6 +402,14 @@ class Action extends HTMLOutputter // lawsuit
function showPrimaryNav()
{
$user = common_current_user();
+ $connect = '';
+ if (common_config('xmpp', 'enabled')) {
+ $connect = 'imsettings';
+ } else if (common_config('sms', 'enabled')) {
+ $connect = 'smssettings';
+ } else if (common_config('twitter', 'enabled')) {
+ $connect = 'twittersettings';
+ }
$this->elementStart('dl', array('id' => 'site_nav_global_primary'));
$this->element('dt', null, _('Primary site navigation'));
@@ -413,12 +421,9 @@ class Action extends HTMLOutputter // lawsuit
_('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
$this->menuItem(common_local_url('profilesettings'),
_('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
- if (common_config('xmpp', 'enabled')) {
- $this->menuItem(common_local_url('imsettings'),
- _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
- } else {
- $this->menuItem(common_local_url('smssettings'),
- _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
+ if ($connect) {
+ $this->menuItem(common_local_url($connect),
+ _('Connect'), _('Connect to services'), false, 'nav_connect');
}
if (common_config('invite', 'enabled')) {
$this->menuItem(common_local_url('invite'),
diff --git a/lib/common.php b/lib/common.php
index b3d301862..be30519f4 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -183,6 +183,12 @@ $config =
array('piddir' => '/var/run',
'user' => false,
'group' => false),
+ 'emailpost' =>
+ array('enabled' => true),
+ 'sms' =>
+ array('enabled' => true),
+ 'twitter' =>
+ array('enabled' => true),
'twitterbridge' =>
array('enabled' => false),
'integration' =>
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],