Révision cce09d94
Ajouté par Phil Davis il y a plus de 9 ans
usr/local/www/system_advanced_notifications.php | ||
---|---|---|
84 | 84 |
|
85 | 85 |
unset($input_errors); |
86 | 86 |
$pconfig = $_POST; |
87 |
$pconfig['smtpssl'] = isset($_POST['smtpssl']) ? 'checked' : 'unchecked'; |
|
88 |
$pconfig['smtptls'] = isset($_POST['smtptls']) ? (isset($_POST['smtpssl']) ? 'unchecked' : 'checked') : 'unchecked'; |
|
87 | 89 |
|
88 | 90 |
/* if this is an AJAX caller then handle via JSON */ |
89 | 91 |
if (isAjax() && is_array($input_errors)) { |
... | ... | |
114 | 116 |
// SMTP |
115 | 117 |
$config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress']; |
116 | 118 |
$config['notifications']['smtp']['port'] = $_POST['smtpport']; |
117 |
$config['notifications']['smtp']['ssl'] = isset($_POST['smtpssl']) ? 'checked' : 'unchecked';
|
|
118 |
$config['notifications']['smtp']['tls'] = isset($_POST['smtptls']) ? (isset($_POST['smtpssl']) ? 'unchecked' : 'checked') : 'unchecked';
|
|
119 |
$config['notifications']['smtp']['ssl'] = $pconfig['smtpssl'];
|
|
120 |
$config['notifications']['smtp']['tls'] = $pconfig['smtptls'];
|
|
119 | 121 |
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress']; |
120 | 122 |
$config['notifications']['smtp']['username'] = $_POST['smtpusername']; |
121 | 123 |
$config['notifications']['smtp']['password'] = $_POST['smtppassword']; |
Formats disponibles : Unified diff
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