summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-10-09 22:27:50 +0545
committerPhil Davis <phil.davis@inf.org>2014-10-09 22:27:50 +0545
commitcce09d9431e15c84aeef2a3117b840d9f969ff02 (patch)
treeef35df4c993898784dda1efc72d6ff8d58429b2e
parentadab585de2380de7be3ef19ab7ad38787a2cdd61 (diff)
downloadpfsense-cce09d9431e15c84aeef2a3117b840d9f969ff02.zip
pfsense-cce09d9431e15c84aeef2a3117b840d9f969ff02.tar.gz
Ticket #3860 Correctly display SMTP SSL TLS boxes
After using the "Test" button, $_POST['smtpssl'] and $_POST['smtptls'] was 'on' or null - this got blindly copied back into $pconfig[] and resulted in the state of the SSL/TLS/STARTTLS checkboxes not being redisplayed. Fixed by setting $pconfig['smtpssl'] and $pconfig['smtptls'] using the code that was previously done only to set these in $config
-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