Skip to content
Permalink
Browse files

0 is now 2 and nothing matters anymore

  • Loading branch information...
NEMS Linux
NEMS Linux committed Apr 12, 2019
1 parent 2d4979e commit 38afff714954973fa8ff1bac8a99055d093909f2
Showing with 3 additions and 8 deletions.
  1. +3 −8 config/index.php
@@ -131,13 +131,8 @@
$output .= '$USER13$=' . (sanitize($_POST['pushover_apikey']) ?: 'NULL') . PHP_EOL;
$output .= '$USER14$=' . (sanitize($_POST['pushover_userkey']) ?: 'NULL') . PHP_EOL;
# TLS for SMTP enabled (1) or not (0), default 1
if (empty($_POST['smtp_tls'])) {
$smtp_tls = 0; // if 0 selected, _POST value will be empty
} else {
$smtp_tls = sanitize($_POST['smtp_tls']);
}
$output .= '$USER15$=' . ($smtp_tls ?: '1') . PHP_EOL;
# TLS for SMTP enabled (1) or not (2), default 1
$output .= '$USER15$=' . (sanitize($_POST['smtp_tls']) ?: '1') . PHP_EOL;
# IPMI credentials
$output .= '$USER16$=' . (sanitize($_POST['ipmi_user']) ?: 'NULL') . PHP_EOL;
@@ -628,7 +623,7 @@ function sanitize($string) {
<label class="select">
<select name="smtp_tls">
<option value="1"<?php if (!isset($USER15) || $USER15 == 1) echo ' SELECTED'; ?>>Use TLS Secure Authentication</option>
<option value="0"<?php if (isset($USER15) && $USER15 == 0) echo ' SELECTED'; ?>>Do not use TLS</option>
<option value="2"<?php if (isset($USER15) && $USER15 == 2) echo ' SELECTED'; ?>>Do not use TLS</option>
</select>
<i></i>
</label>

0 comments on commit 38afff7

Please sign in to comment.
You can’t perform that action at this time.