]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/imsettings.php
More direct text for registration licensing/tos checkbox for private and all-rights...
[quix0rs-gnu-social.git] / actions / imsettings.php
index 3b43e12f776674bc6914e479ca7cbab3a42a00c2..c3360fb12a5b16483428f118d10a9699b703e3d0 100644 (file)
  *
  * @category  Settings
  * @package   StatusNet
- * @author    Evan Prodromou <evan@controlyourself.ca>
+ * @author    Evan Prodromou <evan@status.net>
  * @copyright 2008-2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -39,9 +39,9 @@ require_once INSTALLDIR.'/lib/jabber.php';
  *
  * @category Settings
  * @package  StatusNet
- * @author   Evan Prodromou <evan@controlyourself.ca>
+ * @author   Evan Prodromou <evan@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  *
  * @see      SettingsAction
  */
@@ -56,7 +56,7 @@ class ImsettingsAction extends ConnectSettingsAction
 
     function title()
     {
-        return _('IM Settings');
+        return _('IM settings');
     }
 
     /**
@@ -121,7 +121,7 @@ class ImsettingsAction extends ConnectSettingsAction
             } else {
                 $this->elementStart('ul', 'form_data');
                 $this->elementStart('li');
-                $this->input('jabber', _('IM Address'),
+                $this->input('jabber', _('IM address'),
                              ($this->arg('jabber')) ? $this->arg('jabber') : null,
                              sprintf(_('Jabber or GTalk address, '.
                                        'like "UserName@example.org". '.
@@ -292,7 +292,7 @@ class ImsettingsAction extends ConnectSettingsAction
             $this->showForm(_('Cannot normalize that Jabber ID'));
             return;
         }
-        if (!jabber_valid_base_jid($jabber)) {
+        if (!jabber_valid_base_jid($jabber, common_config('email', 'domain_check'))) {
             $this->showForm(_('Not a valid Jabber ID'));
             return;
         } else if ($user->jabber == $jabber) {
@@ -309,6 +309,8 @@ class ImsettingsAction extends ConnectSettingsAction
         $confirm->address_type = 'jabber';
         $confirm->user_id      = $user->id;
         $confirm->code         = common_confirmation_code(64);
+        $confirm->sent         = common_sql_now();
+        $confirm->claimed      = common_sql_now();
 
         $result = $confirm->insert();
 
@@ -318,11 +320,9 @@ class ImsettingsAction extends ConnectSettingsAction
             return;
         }
 
-        if (!common_config('queue', 'enabled')) {
-            jabber_confirm_address($confirm->code,
-                                   $user->nickname,
-                                   $jabber);
-        }
+        jabber_confirm_address($confirm->code,
+                               $user->nickname,
+                               $jabber);
 
         $msg = sprintf(_('A confirmation code was sent '.
                          'to the IM address you added. '.