summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-10-13 06:54:13 -0500
committerRenato Botelho <garga@FreeBSD.org>2014-10-13 06:54:13 -0500
commit07c24bf190658ec675f19d36204d3a5185c6e0fc (patch)
treeef35df4c993898784dda1efc72d6ff8d58429b2e
parentadab585de2380de7be3ef19ab7ad38787a2cdd61 (diff)
parentcce09d9431e15c84aeef2a3117b840d9f969ff02 (diff)
downloadpfsense-07c24bf190658ec675f19d36204d3a5185c6e0fc.zip
pfsense-07c24bf190658ec675f19d36204d3a5185c6e0fc.tar.gz
Merge pull request #1308 from phil-davis/patch-4
-rw-r--r--usr/local/www/system_advanced_notifications.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php
index fe2eb71..3184fb1 100644
--- a/usr/local/www/system_advanced_notifications.php
+++ b/usr/local/www/system_advanced_notifications.php
@@ -84,6 +84,8 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
+ $pconfig['smtpssl'] = isset($_POST['smtpssl']) ? 'checked' : 'unchecked';
+ $pconfig['smtptls'] = isset($_POST['smtptls']) ? (isset($_POST['smtpssl']) ? 'unchecked' : 'checked') : 'unchecked';
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
@@ -114,8 +116,8 @@ if ($_POST) {
// SMTP
$config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress'];
$config['notifications']['smtp']['port'] = $_POST['smtpport'];
- $config['notifications']['smtp']['ssl'] = isset($_POST['smtpssl']) ? 'checked' : 'unchecked';
- $config['notifications']['smtp']['tls'] = isset($_POST['smtptls']) ? (isset($_POST['smtpssl']) ? 'unchecked' : 'checked') : 'unchecked';
+ $config['notifications']['smtp']['ssl'] = $pconfig['smtpssl'];
+ $config['notifications']['smtp']['tls'] = $pconfig['smtptls'];
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress'];
$config['notifications']['smtp']['username'] = $_POST['smtpusername'];
$config['notifications']['smtp']['password'] = $_POST['smtppassword'];
OpenPOWER on IntegriCloud