Add config upgrade code to validate changes made on c2fe67eb and d269747b. It fixes #4134

This commit is contained in:
Renato Botelho 2014-12-22 15:06:41 -02:00
parent 1df8a7b2b1
commit 792dbafd7b
3 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<pfsense>
<version>11.2</version>
<version>11.3</version>
<lastchange/>
<theme>pfsense_ng</theme>
<system>

View File

@ -73,7 +73,7 @@ $g = array(
"disablecrashreporter" => false,
"crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php",
"debug" => false,
"latest_config" => "11.2",
"latest_config" => "11.3",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "101",
"minimum_ram_warning_text" => "128 MB",

View File

@ -3503,4 +3503,20 @@ function upgrade_111_to_112() {
);
}
function upgrade_112_to_113() {
global $config;
if (isset($config['notifications']['smtp']['ssl']) &&
$config['notifications']['smtp']['ssl'] == "checked")
$config['notifications']['smtp']['ssl'] = true;
else
unset($config['notifications']['smtp']['ssl']);
if (isset($config['notifications']['smtp']['tls']) &&
$config['notifications']['smtp']['tls'] == "checked")
$config['notifications']['smtp']['tls'] = true;
else
unset($config['notifications']['smtp']['tls']);
}
?>