From 3efdd574a6b657eb6b59e80f0db4e5838fb668ab Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sun, 11 Oct 2015 23:48:57 +0200 Subject: Move antivirus config migration to squid_antivirus.inc --- config/squid3/34/squid.inc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'config/squid3/34') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index e28cf56e..cd502658 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -619,6 +619,7 @@ function squid_deinstall_command() { /* Migrate configuration from god knows which Squid package versions */ /* None of these ever existed with Squid 3.4 package and this cruft should be most likely just removed */ function squid_upgrade_config() { + global $config; /* migrate existing csv config fields */ if (is_array($config['installedpackages']['squidauth']['config'])) { $settingsauth = $config['installedpackages']['squidauth']['config'][0]; @@ -742,12 +743,7 @@ function squid_upgrade_config() { } /* unset broken antivirus settings */ - if (is_array($config['installedpackages']['squidantivirus'])) { - unset($config['installedpackages']['squidantivirus']['config'][0]['squidclamav']); - unset($config['installedpackages']['squidantivirus']['config'][0]['c-icap_conf']); - unset($config['installedpackages']['squidantivirus']['config'][0]['c-icap_magic']); - unset($config['installedpackages']['squidantivirus']['config'][0]['freshclam_conf']); - } + squid_antivirus_upgrade_config(); update_output_window("Writing configuration... One moment please..."); write_config(); -- cgit v1.2.3