From d09884543095f17bd295ee9ce67b76ae8512b9b7 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 6 May 2015 14:08:22 -0300 Subject: Use if instead of switch/case statement for boolean test --- config/squid3/34/squid.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'config/squid3') 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; -- cgit v1.2.3