summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-08-07 01:55:31 +0800
committerJeffery To <jeffery.to@gmail.com>2009-08-07 01:55:31 +0800
commit5f293f0e2fd0561caa940c9799fad623ce953a60 (patch)
tree264fe223837d2235f8c64570e1b57922685ab950 /actions
parentc261a645a16fc0498e338cef4144b276a481646c (diff)
Added configuration option to disable post-by-email.
This hides the relevant settings from the email settings page and prevents maildaemon.php from processing email if the option is disabled.
Diffstat (limited to 'actions')
-rw-r--r--actions/emailsettings.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 634388fdd..cdd092829 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -122,7 +122,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 +173,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.'),