diff options
author | D. V. Serg <dvserg@pfsense.org> | 2008-01-21 19:54:42 +0000 |
---|---|---|
committer | D. V. Serg <dvserg@pfsense.org> | 2008-01-21 19:54:42 +0000 |
commit | 60c8e388e48b01a293a9f3f2d9efbcf5688dc271 (patch) | |
tree | 72176ef2c392487c86c03307c733067b3526c874 /packages/squidGuard | |
parent | 3cad00e27d5a40fd57eda02d1a66bdb57382a3f4 (diff) | |
download | pfsense-packages-60c8e388e48b01a293a9f3f2d9efbcf5688dc271.tar.gz pfsense-packages-60c8e388e48b01a293a9f3f2d9efbcf5688dc271.tar.bz2 pfsense-packages-60c8e388e48b01a293a9f3f2d9efbcf5688dc271.zip |
Blacklist update
Diffstat (limited to 'packages/squidGuard')
-rw-r--r-- | packages/squidGuard/squidguard.inc | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/packages/squidGuard/squidguard.inc b/packages/squidGuard/squidguard.inc index f7866965..63663aaf 100644 --- a/packages/squidGuard/squidguard.inc +++ b/packages/squidGuard/squidguard.inc @@ -332,21 +332,31 @@ function squidguard_validate_rewrite($post, $input_errors) { // squidguard_resync // ----------------------------------------------------------------------------- function squidguard_resync() { - $conf = ''; - $upload_file = ''; - - // blacklist upload - if ($_POST['submit'] == BLACKLIST_BTN_URL) { - // upload from another url - $url = $_POST['blacklist_url']; - $proxy = $_POST['blacklist_proxy']; - if ($url) - sg_reconfigure_blacklist($url, $proxy); - } - // apply changes - if ($_POST['submit'] == APPLY_BTN) sg_reconfigure(); + global $config; + $conf = $config['installedpackages'][MODULE_GENERAL]['config'][0]; + $upload_file = ''; + $submit = ''; + + if (isset($_POST['submit'])) + $submit = $_POST['submit']; + else + if (isset($_GET['submit'])) + $submit = $_GET['submit']; + + // blacklist upload + if ($submit == BLACKLIST_BTN_URL) { +# $url = $_POST['blacklist_url']; +# $proxy = $_POST['blacklist_proxy']; + $url = $conf['blacklist_url']; + $proxy = $conf['blacklist_proxy']; + if ($url) + sg_reconfigure_blacklist($url, $proxy); + } + // apply changes + if ($submit == APPLY_BTN) sg_reconfigure(); } + // ----------------------------------------------------------------------------- // squidguard_resync_acl // ----------------------------------------------------------------------------- |