]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/invite.php
Fix for error output on invalid user ID to api groups list
[quix0rs-gnu-social.git] / actions / invite.php
index 9fa6a76f671f471a83b13b590db846401fd6b039..54b2de62ac910e3792f902495c54a4554e81a79c 100644 (file)
@@ -68,7 +68,7 @@ class InviteAction extends CurrentUserDesignAction
 
         foreach ($addresses as $email) {
             $email = trim($email);
-            if (!Validate::email($email, true)) {
+            if (!Validate::email($email, common_config('email', 'check_domain'))) {
                 $this->showForm(sprintf(_('Invalid email address: %s'), $email));
                 return;
             }
@@ -128,7 +128,7 @@ class InviteAction extends CurrentUserDesignAction
             $this->element('p', null, _('You are already subscribed to these users:'));
             $this->elementStart('ul');
             foreach ($this->already as $other) {
-                $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+                $this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email));
             }
             $this->elementEnd('ul');
         }
@@ -136,7 +136,7 @@ class InviteAction extends CurrentUserDesignAction
             $this->element('p', null, _('These people are already users and you were automatically subscribed to them:'));
             $this->elementStart('ul');
             foreach ($this->subbed as $other) {
-                $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+                $this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email));
             }
             $this->elementEnd('ul');
         }
@@ -194,7 +194,8 @@ class InviteAction extends CurrentUserDesignAction
                         _('Optionally add a personal message to the invitation.'));
         $this->elementEnd('li');
         $this->elementEnd('ul');
-        $this->submit('send', _('Send'));
+        // TRANS: Send button for inviting friends
+        $this->submit('send', _m('BUTTON', 'Send'));
         $this->elementEnd('fieldset');
         $this->elementEnd('form');
     }
@@ -241,7 +242,7 @@ class InviteAction extends CurrentUserDesignAction
                         common_root_url(),
                         $personal,
                         common_local_url('showstream', array('nickname' => $user->nickname)),
-                        common_local_url((!common_config('site', 'openidonly')) ? 'register' : 'openidlogin', array('code' => $invite->code)));
+                        common_local_url('register', array('code' => $invite->code)));
 
         mail_send($recipients, $headers, $body);
     }