diff options
author | Craig Andrews <candrews@integralblue.com> | 2010-06-16 16:00:54 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2010-06-16 16:00:54 -0400 |
commit | 1a62d1b49378bba4b69476282b9a5d0e03073405 (patch) | |
tree | 2a49ef455a5a0279cfdc41381db09ed5bb0240b4 /actions | |
parent | 4ee2c12507b046e048ff023b94872cbbe9bde9a4 (diff) |
Use presence of IM plugins to decide if "IM" options should be available
Diffstat (limited to 'actions')
-rw-r--r-- | actions/subscriptions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 7b10b3425..da563a218 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -185,7 +185,9 @@ class SubscriptionsListItem extends SubscriptionListItem return; } - if (!common_config('xmpp', 'enabled') && !common_config('sms', 'enabled')) { + $transports = array(); + Event::handle('GetImTransports', array(&$transports)); + if (!$transports && !common_config('sms', 'enabled')) { return; } @@ -195,7 +197,7 @@ class SubscriptionsListItem extends SubscriptionListItem 'action' => common_local_url('subedit'))); $this->out->hidden('token', common_session_token()); $this->out->hidden('profile', $this->profile->id); - if (common_config('xmpp', 'enabled')) { + if ($transports) { $attrs = array('name' => 'jabber', 'type' => 'checkbox', 'class' => 'checkbox', @@ -205,7 +207,7 @@ class SubscriptionsListItem extends SubscriptionListItem } $this->out->element('input', $attrs); - $this->out->element('label', array('for' => 'jabber-'.$this->profile->id), _('Jabber')); + $this->out->element('label', array('for' => 'jabber-'.$this->profile->id), _('IM')); } else { $this->out->hidden('jabber', $sub->jabber); } |