Update L7 config upgrade code removal. Only file notice if it was actually in use, otherwise it just confuses people.

This commit is contained in:
Chris Buechler 2016-05-08 03:14:10 -05:00
parent 291fad4387
commit ad9b77f9eb

View File

@ -4320,16 +4320,20 @@ function upgrade_134_to_135() {
function upgrade_135_to_136() {
global $config;
$l7_active = false;
if (isset($config['l7shaper'])) {
file_notice("L7shaper", gettext("Layer 7 shaping is no longer supported. Its configuration has been removed."));
unset($config['l7shaper']);
if (is_array($config['filter']['rule'])) {
foreach ($config['filter']['rule'] as $idx => $rule) {
if (isset($rule['l7container'])) {
unset($config['filter']['rule'][$idx]['l7container']);
$l7_active = true;
}
}
}
if ($l7_active) {
file_notice("L7shaper", gettext("Layer 7 shaping is no longer supported. Its configuration has been removed."));
}
}
}