diff options
author | jim-p <jimp@pfsense.org> | 2010-06-22 15:18:29 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-06-22 15:18:29 -0400 |
commit | 763bd7cf43b6550a068b8b24b27a07a2a3eab8a1 (patch) | |
tree | 9918d82aad559c9a8f141faaf62d0e44570cad81 /config | |
parent | 91b4b904f8832c3eed7fa788594f646ca5b88569 (diff) | |
download | pfsense-packages-763bd7cf43b6550a068b8b24b27a07a2a3eab8a1.tar.gz pfsense-packages-763bd7cf43b6550a068b8b24b27a07a2a3eab8a1.tar.bz2 pfsense-packages-763bd7cf43b6550a068b8b24b27a07a2a3eab8a1.zip |
A few misc. squidGuard fixes to make it behave better on reboot, especially on NanoBSD.
Diffstat (limited to 'config')
-rw-r--r-- | config/squidGuard/squidguard.inc | 4 | ||||
-rw-r--r-- | config/squidGuard/squidguard_configurator.inc | 24 |
2 files changed, 16 insertions, 12 deletions
diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc index 8007e302..d0e1213a 100644 --- a/config/squidGuard/squidguard.inc +++ b/config/squidGuard/squidguard.inc @@ -316,11 +316,11 @@ function squidguard_resync() { } # apply changes - if ($submit == APPLY_BTN) { + //if ($submit == APPLY_BTN) { # write_config('Update squidGuard options.'); # store, if not 'Save' button # перенести в validate для детектирования ошибок? sg_reconfigure(); - } + //} } # ----------------------------------------------------------------------------- diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc index 73f935bc..afc6d23a 100644 --- a/config/squidGuard/squidguard_configurator.inc +++ b/config/squidGuard/squidguard_configurator.inc @@ -1193,16 +1193,18 @@ function sg_check_config_data ($input_errors) } # --- Blacklist --- - $blk_entries_file = $squidguard_config[F_WORKDIR] . SQUIDGUARD_BLK_ENTRIES; - if (file_exists($blk_entries_file)) { - $blk_entr = explode("\n", file_get_contents($blk_entries_file)); - foreach($blk_entr as $entr) { - if ($entr) { - $destinations[] = $entr; - # check entry for exists - $dbfile = $squidguard_config[F_DBHOME] . "/$entr"; - if (!file_exists($dbfile)) - $elog[] = "(B1) BLACKLIST '$entr' error: file '$dbfile' not found"; + if ($squidguard_config[F_BLACKLISTENABLED]) { + $blk_entries_file = $squidguard_config[F_WORKDIR] . SQUIDGUARD_BLK_ENTRIES; + if (file_exists($blk_entries_file)) { + $blk_entr = explode("\n", file_get_contents($blk_entries_file)); + foreach($blk_entr as $entr) { + if ($entr) { + $destinations[] = $entr; + # check entry for exists + $dbfile = $squidguard_config[F_DBHOME] . "/$entr"; + if (!file_exists($dbfile)) + $elog[] = "(B1) BLACKLIST '$entr' error: file '$dbfile' not found"; + } } } } @@ -2057,6 +2059,8 @@ function acl_remove_blacklist_items($items) { # add !items and ^items $db_entries = sg_entries_blacklist(); + if (!is_array($db_entries)) + return; $tdb_entries = array(); foreach ($db_entries as $ent) { $tdb_entries[] = $ent; |