<?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
* 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
{
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;
}
$this->showPage();
}
+ function showScripts()
+ {
+ parent::showScripts();
+ $this->autofocus('addresses');
+ }
+
function title()
{
if ($this->mode == 'sent') {
$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');
}
$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');
}