]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/subscriptions.php
Merge branch '0.9.x' into 1.0.x
[quix0rs-gnu-social.git] / actions / subscriptions.php
index 697577c1073a98fac951d70e56e5562a39e377d2..cfe2b5683a830673f7bda83c877ef768a2ac78a5 100644 (file)
@@ -215,7 +215,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;
         }
 
@@ -225,7 +227,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',
@@ -236,7 +238,7 @@ class SubscriptionsListItem extends SubscriptionListItem
 
             $this->out->element('input', $attrs);
             // TRANS: Checkbox label for enabling Jabber messages for a profile in a subscriptions list.
-            $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);
         }