diff options
author | D. V. Serg <dvserg@pfsense.org> | 2008-02-22 08:21:44 +0000 |
---|---|---|
committer | D. V. Serg <dvserg@pfsense.org> | 2008-02-22 08:21:44 +0000 |
commit | 9261f5dc7afe273d4b149cf028e14c8eaecf3a93 (patch) | |
tree | f72775383475d0280ef4c6de8509c5ea0d1f83c5 /packages | |
parent | 72bac12dce7e969ec4264c10a879a228b14b0633 (diff) | |
download | pfsense-packages-9261f5dc7afe273d4b149cf028e14c8eaecf3a93.tar.gz pfsense-packages-9261f5dc7afe273d4b149cf028e14c8eaecf3a93.tar.bz2 pfsense-packages-9261f5dc7afe273d4b149cf028e14c8eaecf3a93.zip |
Rew fix
Diffstat (limited to 'packages')
-rw-r--r-- | packages/squidGuard/squidguard_configurator.inc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/packages/squidGuard/squidguard_configurator.inc b/packages/squidGuard/squidguard_configurator.inc index e2f4981d..b589c42c 100644 --- a/packages/squidGuard/squidguard_configurator.inc +++ b/packages/squidGuard/squidguard_configurator.inc @@ -986,19 +986,23 @@ function sg_build_config() { if ($squidguard_config[FLD_REWRITES]) { sg_addlog("sg_build_config: add rewrites."); $log_entr_added = ''; + $log_entr_err = ''; foreach($squidguard_config[FLD_REWRITES][FLD_ITEM] as $rew) { - $sgconf[] = ""; - $sgconf[] = "rew " . $rew[FLD_NAME] . " {"; - foreach ($rew[FLD_ITEM] as $rw) + if (is_array($rew[FLD_ITEM])) { + $sgconf[] = ""; + $sgconf[] = "rew " . $rew[FLD_NAME] . " {"; + foreach ($rew[FLD_ITEM] as $rw) $sgconf[] = "\t s@." . $rw[FLD_TARGETURL] . "@" . $rw[FLD_REPLACETO]."@r"; - if ($rew[FLD_LOG]) - $sgconf[] = "\t log " . SQUIDGUARD_ACCESSBLOCK_FILE; - $sgconf[] = "}"; - $log_entr_added .= " {$rew[FLD_NAME]};"; + if ($rew[FLD_LOG]) + $sgconf[] = "\t log " . SQUIDGUARD_ACCESSBLOCK_FILE; + $sgconf[] = "}"; + $log_entr_added .= " {$rew[FLD_NAME]};"; + } else + $log_entr_err .= " {$rew[FLD_NAME]};"; } // log if (!empty($log_entr_added)) - sg_addlog("sg_build_config: added: \n $log_entr_added \n"); + sg_addlog("sg_build_config: added: \n $log_entr_added \n error: \n $log_entr_err "); else sg_addlog("sg_build_config: added: Nothing."); } |