]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/invite.php
* check usage of 'people' in UI and change it to 'users' or something else in most...
[quix0rs-gnu-social.git] / actions / invite.php
index 26c951ed2233d89da409a5c4e7f90d27ad213614..8a0ac8a1b05a6c2cd3861a72497cd3e640ddc74e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, Control Yourself, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
 class InviteAction extends CurrentUserDesignAction
 {
@@ -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;
             }
@@ -98,6 +98,12 @@ class InviteAction extends CurrentUserDesignAction
         $this->showPage();
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('addresses');
+    }
+
     function title()
     {
         if ($this->mode == 'sent') {
@@ -127,7 +133,7 @@ class InviteAction extends CurrentUserDesignAction
             $this->elementEnd('ul');
         }
         if ($this->subbed) {
-            $this->element('p', null, _('These people are already users and you were automatically subscribed to them:'));
+            $this->element('p', null, _('These 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));
@@ -135,7 +141,7 @@ class InviteAction extends CurrentUserDesignAction
             $this->elementEnd('ul');
         }
         if ($this->sent) {
-            $this->element('p', null, _('Invitation(s) sent to the following people:'));
+            $this->element('p', null, _('Invitation(s) sent to the following e-mail addresses:'));
             $this->elementStart('ul');
             foreach ($this->sent as $other) {
                 $this->element('li', null, $other);
@@ -220,9 +226,9 @@ class InviteAction extends CurrentUserDesignAction
         $headers['Subject'] = sprintf(_('%1$s has invited you to join them on %2$s'), $bestname, $sitename);
 
         $body = sprintf(_("%1\$s has invited you to join them on %2\$s (%3\$s).\n\n".
-                          "%2\$s is a micro-blogging service that lets you keep up-to-date with people you know and people who interest you.\n\n".
-                          "You can also share news about yourself, your thoughts, or your life online with people who know about you. ".
-                          "It's also great for meeting new people who share your interests.\n\n".
+                          "%2\$s is a micro-blogging service that lets you keep up-to-date with those you know and those who interest you.\n\n".
+                          "You can also share news about yourself, your thoughts, or your life online with users who know about you. ".
+                          "It is also great for meeting others who share your interests.\n\n".
                           "%1\$s said:\n\n%4\$s\n\n".
                           "You can see %1\$s's profile page on %2\$s here:\n\n".
                           "%5\$s\n\n".