summaryrefslogtreecommitdiff
path: root/actions
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 /actions
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 'actions')
-rw-r--r--actions/imsettings.php6
-rw-r--r--actions/smssettings.php6
-rw-r--r--actions/twittersettings.php6
3 files changed, 18 insertions, 0 deletions
diff --git a/actions/imsettings.php b/actions/imsettings.php
index e0f5ede3a..70a6f37d4 100644
--- a/actions/imsettings.php
+++ b/actions/imsettings.php
@@ -84,6 +84,12 @@ class ImsettingsAction extends ConnectSettingsAction
function showContent()
{
+ if (!common_config('xmpp', 'enabled')) {
+ $this->element('div', array('class' => 'error'),
+ _('IM is not available.'));
+ return;
+ }
+
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
'id' => 'form_settings_im',
diff --git a/actions/smssettings.php b/actions/smssettings.php
index 922bab9a4..33b54abf6 100644
--- a/actions/smssettings.php
+++ b/actions/smssettings.php
@@ -80,6 +80,12 @@ class SmssettingsAction extends ConnectSettingsAction
function showContent()
{
+ if (!common_config('sms', 'enabled')) {
+ $this->element('div', array('class' => 'error'),
+ _('SMS is not available.'));
+ return;
+ }
+
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
diff --git a/actions/twittersettings.php b/actions/twittersettings.php
index 2b742788e..3343dba95 100644
--- a/actions/twittersettings.php
+++ b/actions/twittersettings.php
@@ -85,6 +85,12 @@ class TwittersettingsAction extends ConnectSettingsAction
function showContent()
{
+ if (!common_config('twitter', 'enabled')) {
+ $this->element('div', array('class' => 'error'),
+ _('Twitter is not available.'));
+ return;
+ }
+
$user = common_current_user();
$profile = $user->getProfile();