forked from GNUsocial/gnu-social
Merge remote branch 'statusnet/1.0.x' into msn-plugin
This commit is contained in:
commit
7a6eb53b79
@ -185,7 +185,9 @@ class SubscriptionsListItem extends SubscriptionListItem
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!common_config('xmpp', 'enabled') && !common_config('sms', 'enabled')) {
|
$transports = array();
|
||||||
|
Event::handle('GetImTransports', array(&$transports));
|
||||||
|
if (!$transports && !common_config('sms', 'enabled')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +197,7 @@ class SubscriptionsListItem extends SubscriptionListItem
|
|||||||
'action' => common_local_url('subedit')));
|
'action' => common_local_url('subedit')));
|
||||||
$this->out->hidden('token', common_session_token());
|
$this->out->hidden('token', common_session_token());
|
||||||
$this->out->hidden('profile', $this->profile->id);
|
$this->out->hidden('profile', $this->profile->id);
|
||||||
if (common_config('xmpp', 'enabled')) {
|
if ($transports) {
|
||||||
$attrs = array('name' => 'jabber',
|
$attrs = array('name' => 'jabber',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'class' => 'checkbox',
|
'class' => 'checkbox',
|
||||||
@ -205,7 +207,7 @@ class SubscriptionsListItem extends SubscriptionListItem
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->out->element('input', $attrs);
|
$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 {
|
} else {
|
||||||
$this->out->hidden('jabber', $sub->jabber);
|
$this->out->hidden('jabber', $sub->jabber);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,9 @@ class ConnectSettingsNav extends Widget
|
|||||||
|
|
||||||
# action => array('prompt', 'title')
|
# action => array('prompt', 'title')
|
||||||
$menu = array();
|
$menu = array();
|
||||||
if (common_config('xmpp', 'enabled')) {
|
$transports = array();
|
||||||
|
Event::handle('GetImTransports', array(&$transports));
|
||||||
|
if ($transports) {
|
||||||
$menu['imsettings'] =
|
$menu['imsettings'] =
|
||||||
array(_('IM'),
|
array(_('IM'),
|
||||||
_('Updates by instant messenger (IM)'));
|
_('Updates by instant messenger (IM)'));
|
||||||
|
Loading…
Reference in New Issue
Block a user