From 5679253ca1de969f668422f9e19c334eaacdaef7 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 26 Oct 2015 15:19:06 -0200 Subject: Require notices.inc only if it's going to be used --- src/etc/inc/upgrade_config.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/etc/inc/upgrade_config.inc') diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index b4a8170..8d35c26 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -3982,7 +3982,6 @@ function upgrade_122_to_123() { } function upgrade_123_to_124() { - require_once("notices.inc"); global $config; /* Find interfaces with WEP configured. */ @@ -3993,6 +3992,9 @@ function upgrade_123_to_124() { /* Generate a notice, disable interface, remove WEP settings */ if (isset($intf['wireless']['wep']['enable'])) { + if (!function_exists("file_notice")) { + require_once("notices.inc"); + } file_notice("WirelessSettings", "WEP is no longer supported. It will be disabled on the {$ifname} interface and the interface will be disabled. Please reconfigure the interface."); unset($config['interfaces'][$ifname]['wireless']['wep']); if (isset($intf['enable'])) { -- cgit v1.1