diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-05-06 14:08:22 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-05-06 14:08:22 -0300 |
commit | d09884543095f17bd295ee9ce67b76ae8512b9b7 (patch) | |
tree | 9d3b4aba66212b8b5715a0dba7471ad4b4ac277d /config/squid3/34 | |
parent | 181d2df4d0345dea266880c63045fc24b27fd49c (diff) | |
download | pfsense-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/34')
-rwxr-xr-x | config/squid3/34/squid.inc | 5 |
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; |