From ad9b77f9ebef8a87e1ab912075bbcd50c02b27de Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Sun, 8 May 2016 03:14:10 -0500 Subject: [PATCH] Update L7 config upgrade code removal. Only file notice if it was actually in use, otherwise it just confuses people. --- src/etc/inc/upgrade_config.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index df90e9aaa2..cf2907923d 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -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.")); + } } }