aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-06 14:08:22 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-06 14:08:22 -0300
commitd09884543095f17bd295ee9ce67b76ae8512b9b7 (patch)
tree9d3b4aba66212b8b5715a0dba7471ad4b4ac277d /config/squid3
parent181d2df4d0345dea266880c63045fc24b27fd49c (diff)
downloadpfsense-packages-d09884543095f17bd295ee9ce67b76ae8512b9b7.tar.gz
pfsense-packages-d09884543095f17bd295ee9ce67b76ae8512b9b7.tar.bz2
pfsense-packages-d09884543095f17bd295ee9ce67b76ae8512b9b7.zip
Use if instead of switch/case statement for boolean test
Diffstat (limited to 'config/squid3')
-rwxr-xr-xconfig/squid3/34/squid.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 0d22264c..55027430 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -804,8 +804,7 @@ function squid_install_cron($should_install) {
}
$x++;
}
- switch($should_install) {
- case true:
+ if ($should_install) {
$cachedir =($settings['harddisk_cache_location'] ? $settings['harddisk_cache_location'] : '/var/squid/cache');
if ($rotate_job_id < 0) {
$cron_item['command']=($settings['clear_cache']=='on' ? "/usr/local/pkg/swapstate_check.php clean; " : "");
@@ -841,7 +840,7 @@ function squid_install_cron($should_install) {
write_config("Adding Squid Cron Jobs");
}
break;
- case false:
+ } else {
if ($rotate_job_id >= 0) {
unset($config['cron']['item'][$rotate_job_id]);
$need_write = true;