From 6182ddebe44b3c741ff3fbb7f299f85463fca686 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 24 Aug 2008 19:09:33 +0000 Subject: ticket: 1806 fixed --- packages/squid/squid.inc | 14 +++++++++----- packages/squid3/squid.inc | 10 ++++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc index 444a4406..5bfe57fb 100644 --- a/packages/squid/squid.inc +++ b/packages/squid/squid.inc @@ -4,7 +4,6 @@ squid.inc Copyright (C) 2006 Scott Ullrich Copyright (C) 2006 Fernando Lemos - Copyright (C) 2008 Martin Fuchs All rights reserved. Redistribution and use in source and binary forms, with or without @@ -529,7 +528,7 @@ function squid_resync_general() { $language = ($settings['error_language'] ? $settings['error_language'] : 'English'); $errordir = SQUID_CONFBASE . '/errors/' . $language; $icondir = SQUID_CONFBASE . '/icons'; - $hostname = ($settings['visible_hostname'] ? $settings['visible_hostname'] : 'localhost'); + $hostname = ($settings['visible_hostname'] ? $settings['visible_hostname'] : 'localhost'); $email = ($settings['admin_email'] ? $settings['admin_email'] : 'admin@localhost'); $logdir = ($settings['log_dir'] ? $settings['log_dir'] : '/var/squid/log'); @@ -619,7 +618,10 @@ EOD; $conf .= 'acl donotcache dstdomain "' . SQUID_ACLDIR . "/donotcache.acl\"\n"; $conf .= 'cache deny donotcache'; } - + elseif (file_exists(SQUID_ACLDIR . '/donotcache.acl')) { + unlink(SQUID_ACLDIR . '/donotcache.acl'); + } + return $conf; } @@ -655,7 +657,7 @@ function squid_resync_redirector() { function squid_resync_nac() { global $config, $valid_acls; - $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); + $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); $settings = $config['installedpackages']['squidnac']['config'][0]; $webgui_port = $config['system']['webgui']['port']; @@ -698,10 +700,12 @@ EOD; $conf .= "acl $option $directive \"" . SQUID_ACLDIR . "/$option.acl\"\n"; $valid_acls[] = $option; } + elseif (file_exists(SQUID_ACLDIR . "/$option.acl")) { + unlink(SQUID_ACLDIR . "/$option.acl"); + } } $conf .= <<