aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2007-01-17 12:27:13 +0000
committerSeth Mos <seth.mos@xs4all.nl>2007-01-17 12:27:13 +0000
commit79c6ac797acf07d9bd0e99281528f00f87f1bbf5 (patch)
tree101de68451fe1bda8cb6b75855fafeffb04b6b77
parent251287eb50bfe052cd0a62e417016f0cefe9012c (diff)
downloadpfsense-packages-79c6ac797acf07d9bd0e99281528f00f87f1bbf5.tar.gz
pfsense-packages-79c6ac797acf07d9bd0e99281528f00f87f1bbf5.tar.bz2
pfsense-packages-79c6ac797acf07d9bd0e99281528f00f87f1bbf5.zip
Correctly migrate the config settings. Use \n expansion, not the literal characters.
-rw-r--r--packages/squid/squid.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc
index 6d944b2a..d5f2c37d 100644
--- a/packages/squid/squid.inc
+++ b/packages/squid/squid.inc
@@ -108,7 +108,7 @@ function squid_install_command() {
/* migrate auth settings */
if (!empty($settingsauth['no_auth_hosts'])) {
if(strstr($settingsauth['no_auth_hosts'], ",")) {
- $settingsauth['no_auth_hosts'] = base64_encode(implode('\n', explode(",", $settingsauth['no_auth_hosts'])));
+ $settingsauth['no_auth_hosts'] = base64_encode(implode("\n", explode(",", $settingsauth['no_auth_hosts'])));
$config['installedpackages']['squidauth']['config'][0]['no_auth_hosts'] = $settingsauth['no_auth_hosts'];
}
}
@@ -116,7 +116,7 @@ function squid_install_command() {
/* migrate cache settings */
if (!empty($settingscache['donotcache'])) {
if(strstr($settingscache['donotcache'], ",")) {
- $settingscache['donotcache'] = base64_encode(implode('\n', explode(",", $settingscache['donotcache'])));
+ $settingscache['donotcache'] = base64_encode(implode("\n", explode(",", $settingscache['donotcache'])));
$config['installedpackages']['squidcache']['config'][0]['donotcache'] = $settingscache['donotcache'];
}
}
@@ -124,43 +124,43 @@ function squid_install_command() {
/* migrate nac settings */
if(! empty($settingsnac['allowed_subnets'])) {
if(strstr($settingsnac['allowed_subnets'], ",")) {
- $settingsnac['allowed_subnets'] = base64_encode(implode('\n', explode(",", $settingsnac['allowed_subnets'])));
+ $settingsnac['allowed_subnets'] = base64_encode(implode("\n", explode(",", $settingsnac['allowed_subnets'])));
$config['installedpackages']['squidnac']['config'][0]['allowed_subnets'] = $settingsnac['allowed_subnets'];
}
}
if(! empty($settingsnac['banned_hosts'])) {
if(strstr($settingsnac['banned_hosts'], ",")) {
- $settingsnac['banned_hosts'] = base64_encode(implode('\n', explode(",", $settingsnac['banned_hosts'])));
+ $settingsnac['banned_hosts'] = base64_encode(implode("\n", explode(",", $settingsnac['banned_hosts'])));
$config['installedpackages']['squidnac']['config'][0]['banned_hosts'] = $settingsnac['banned_hosts'];
}
}
if(! empty($settingsnac['banned_macs'])) {
if(strstr($settingsnac['banned_macs'], ",")) {
- $settingsnac['banned_macs'] = base64_encode(implode('\n', explode(",", $settingsnac['banned_macs'])));
+ $settingsnac['banned_macs'] = base64_encode(implode("\n", explode(",", $settingsnac['banned_macs'])));
$config['installedpackages']['squidnac']['config'][0]['banned_macs'] = $settingsnac['banned_macs'];
}
}
if(! empty($settingsnac['unrestricted_hosts'])) {
if(strstr($settingsnac['unrestricted_hosts'], ",")) {
- $settingsnac['unrestricted_hosts'] = base64_encode(implode('\n', explode(",", $settingsnac['unrestricted_hosts'])));
+ $settingsnac['unrestricted_hosts'] = base64_encode(implode("\n", explode(",", $settingsnac['unrestricted_hosts'])));
$config['installedpackages']['squidnac']['config'][0]['unrestricted_hosts'] = $settingsnac['unrestricted_hosts'];
}
}
if(! empty($settingsnac['unrestricted_macs'])) {
if(strstr($settingsnac['unrestricted_macs'], ",")) {
- $settingsnac['unrestricted_macs'] = base64_encode(implode('\n', explode(",", $settingsnac['unrestricted_macs'])));
+ $settingsnac['unrestricted_macs'] = base64_encode(implode("\n", explode(",", $settingsnac['unrestricted_macs'])));
$config['installedpackages']['squidnac']['config'][0]['unrestricted_macs'] = $settingsnac['unrestricted_macs'];
}
}
if(! empty($settingsnac['whitelist'])) {
if(strstr($settingsnac['whitelist'], ",")) {
- $settingsnac['whitelist'] = base64_encode(implode('\n', explode(",", $settingsnac['whitelist'])));
+ $settingsnac['whitelist'] = base64_encode(implode("\n", explode(",", $settingsnac['whitelist'])));
$config['installedpackages']['squidnac']['config'][0]['whitelist'] = $settingsnac['whitelist'];
}
}
if(! empty($settingsnac['blacklist'])) {
if(strstr($settingsnac['blacklist'], ",")) {
- $settingsnac['blacklist'] = base64_encode(implode('\n', explode(",", $settingsnac['blacklist'])));
+ $settingsnac['blacklist'] = base64_encode(implode("\n", explode(",", $settingsnac['blacklist'])));
$config['installedpackages']['squidnac']['config'][0]['blacklist'] = $settingsnac['blacklist'];
}
}