summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-08-07 01:18:17 +0800
committerJeffery To <jeffery.to@gmail.com>2009-08-07 01:18:17 +0800
commit93f585446ebaa4a9347b6e6f77f58ab023b5b51c (patch)
tree78579bf89c17cc946539568426f650ea70af6500 /lib/action.php
parentc8c2d9d7c93f40e7ac81c6211f8ba4c3f6ae91d9 (diff)
Added configuration options to enable/disable SMS and Twitter integration.
This disables the IM, SMS and Twitter settings pages and queue handlers depending on the config options.
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php17
1 files changed, 11 insertions, 6 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'),