]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/emailsettings.php
Merge branch '0.8.x' of git://gitorious.org/~brion/statusnet/brion-fixes into 0.8.x
[quix0rs-gnu-social.git] / actions / emailsettings.php
index 634388fdddbdf41acae10d679719d45148c5d869..6eff06c0d667b66fc6056ed706a83a7141efb89a 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
      *
@@ -122,7 +128,7 @@ class EmailsettingsAction extends AccountSettingsAction
         }
         $this->elementEnd('fieldset');
 
-       if ($user->email) {
+       if (common_config('emailpost', 'enabled') && $user->email) {
             $this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
             $this->element('legend',_('Incoming email'));
             if ($user->incomingemail) {
@@ -173,11 +179,13 @@ class EmailsettingsAction extends AccountSettingsAction
                         _('Allow friends to nudge me and send me an email.'),
                         $user->emailnotifynudge);
         $this->elementEnd('li');
-        $this->elementStart('li');
-        $this->checkbox('emailpost',
-                        _('I want to post notices by email.'),
-                        $user->emailpost);
-        $this->elementEnd('li');
+        if (common_config('emailpost', 'enabled')) {
+            $this->elementStart('li');
+            $this->checkbox('emailpost',
+                            _('I want to post notices by email.'),
+                            $user->emailpost);
+            $this->elementEnd('li');
+        }
         $this->elementStart('li');
         $this->checkbox('emailmicroid',
                         _('Publish a MicroID for my email address.'),