return;
}
- if (!common_config('xmpp', 'enabled') && !common_config('sms', 'enabled')) {
+ $transports = array();
+ Event::handle('GetImTransports', array(&$transports));
+ if (!$transports && !common_config('sms', 'enabled')) {
return;
}
'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',
}
$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);
}
# action => array('prompt', 'title')
$menu = array();
- if (Event::handle('GetImTransports', array(&$transports))) {
+ $transports = array();
+ Event::handle('GetImTransports', array(&$transports));
+ if ($transports) {
$menu['imsettings'] =
array(_('IM'),
_('Updates by instant messenger (IM)'));