]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/emailsettings.php
Merge branch 'locshunt' into 0.9.x
[quix0rs-gnu-social.git] / actions / emailsettings.php
index cdd09282991fab1cabdd3bb2e22ee6018ce04fad..761aaa8f31f397bcd2dbb3fad24c4efa4bfefd83 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Settings for email
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Settings
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @author    Zach Copley <zach@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Zach Copley <zach@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);
 }
 
@@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * Settings for email
  *
  * @category Settings
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Zach Copley <zach@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      Widget
  */
@@ -71,6 +71,12 @@ class EmailsettingsAction extends AccountSettingsAction
         return _('Manage how you get email from %%site.name%%.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('email');
+    }
+
     /**
      * Content area of the page
      *
@@ -89,7 +95,7 @@ class EmailsettingsAction extends AccountSettingsAction
                                           'class' => 'form_settings',
                                           'action' =>
                                           common_local_url('emailsettings')));
-
+        $this->elementStart('fieldset');
         $this->elementStart('fieldset', array('id' => 'settings_email_address'));
         $this->element('legend', null, _('Address'));
         $this->hidden('token', common_session_token());
@@ -188,6 +194,7 @@ class EmailsettingsAction extends AccountSettingsAction
         $this->elementEnd('ul');
         $this->submit('save', _('Save'));
         $this->elementEnd('fieldset');
+        $this->elementEnd('fieldset');
         $this->elementEnd('form');
     }
 
@@ -320,7 +327,7 @@ class EmailsettingsAction extends AccountSettingsAction
             $this->showForm(_('Cannot normalize that email address'));
             return;
         }
-        if (!Validate::email($email, true)) {
+        if (!Validate::email($email, common_config('email', 'check_domain'))) {
             $this->showForm(_('Not a valid email address'));
             return;
         } else if ($user->email == $email) {