aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-06 14:11:48 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-06 14:11:48 -0300
commitfc0424c3434c2464094c019863169a3143dd1d65 (patch)
tree810337aa85dbd74bc9deb72ffdec0a4c1b38dc16 /config
parentd09884543095f17bd295ee9ce67b76ae8512b9b7 (diff)
downloadpfsense-packages-fc0424c3434c2464094c019863169a3143dd1d65.tar.gz
pfsense-packages-fc0424c3434c2464094c019863169a3143dd1d65.tar.bz2
pfsense-packages-fc0424c3434c2464094c019863169a3143dd1d65.zip
Simplify logic
Diffstat (limited to 'config')
-rwxr-xr-xconfig/squid3/34/squid.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 55027430..d78aa27c 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -1224,9 +1224,12 @@ EOD;
function squid_resync_upstream() {
global $config;
+
+ if (!is_array($config['installedpackages']['squidremote']['config']))
+ $config['installedpackages']['squidremote']['config'] = array();
+
$conf = "\n#Remote proxies\n";
- if (is_array($config['installedpackages']['squidremote']['config']))
- foreach ($config['installedpackages']['squidremote']['config'] as $settings) {
+ foreach ($config['installedpackages']['squidremote']['config'] as $settings) {
if ($settings['enable'] == 'on') {
$conf .= "cache_peer {$settings['proxyaddr']} {$settings['hierarchy']} {$settings['proxyport']} ";
if ($settings['icpport'] == '7')