diff options
author | jim-p <jimp@pfsense.org> | 2013-02-04 11:21:56 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-02-04 11:21:56 -0500 |
commit | 28ce6dbe802469071117b0632816f9cac924123c (patch) | |
tree | e90b6b442fae5ed0bf158e7a8697e3cbf8f09a24 | |
parent | 4a7cadee0aa4d80872fbfe0923311c75da4700ea (diff) | |
download | pfsense-packages-28ce6dbe802469071117b0632816f9cac924123c.tar.gz pfsense-packages-28ce6dbe802469071117b0632816f9cac924123c.tar.bz2 pfsense-packages-28ce6dbe802469071117b0632816f9cac924123c.zip |
Only update squid options if we have something to do, otherwise this can interfere with squid's default options in a new install if someone installs squidGuard without first configuring squid.
-rw-r--r-- | config/squidGuard/squidguard_configurator.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc index 0100fba4..81f9cd96 100644 --- a/config/squidGuard/squidguard_configurator.inc +++ b/config/squidGuard/squidguard_configurator.inc @@ -443,8 +443,11 @@ function squid_reconfigure($remove_only = '') # update config if (is_array($conf)) $conf = implode(";", $conf); - $config['installedpackages']['squid']['config'][0]['custom_options'] = $conf; - write_config('Update redirector options to squid config.'); + /* Only update squid options if we have something to do, otherwise this can interfere with squid's default options in a new install. */ + if (!empty($conf)) { + $config['installedpackages']['squid']['config'][0]['custom_options'] = $conf; + write_config('Update redirector options to squid config.'); + } # resync squid package, if installed if (function_exists('squid_resync')) { |