diff options
author | jim-p <jimp@pfsense.org> | 2011-06-07 16:53:13 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-07 16:53:13 -0400 |
commit | 7bef817c095ef732a2e279c6399e63aeb75f56fe (patch) | |
tree | a31c6e44376f59a1b535b5f459c8dc28928d362d /config/squidGuard/sgerror.php | |
parent | b2c845aed3f6ce74eed5c8ffa086fe668ba8bf7d (diff) | |
download | pfsense-packages-7bef817c095ef732a2e279c6399e63aeb75f56fe.tar.gz pfsense-packages-7bef817c095ef732a2e279c6399e63aeb75f56fe.tar.bz2 pfsense-packages-7bef817c095ef732a2e279c6399e63aeb75f56fe.zip |
Add a box to allow the user to override the default squidguard "Request denied by pfSense proxy". Also don't use pfSense there, but the product name instead.
Diffstat (limited to 'config/squidGuard/sgerror.php')
-rw-r--r-- | config/squidGuard/sgerror.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/config/squidGuard/sgerror.php b/config/squidGuard/sgerror.php index 8084c5c3..e1e49385 100644 --- a/config/squidGuard/sgerror.php +++ b/config/squidGuard/sgerror.php @@ -1,4 +1,6 @@ <?php +include "globals.inc"; +include "config.inc"; $page_info = <<<EOD # ---------------------------------------------------------------------------------------------------------------------- # SquidGuard error page generator @@ -204,13 +206,19 @@ function get_page($body) { function get_error_page($er_code_id, $err_msg='') { global $err_code; global $cl; + global $g; + global $config; $str = Array(); header("HTTP/1.1 " . $err_code[$er_code_id]); $str[] = '<html>'; $str[] = '<body>'; - $str[] = '<h3>Request denied by pfSense proxy: ' . $err_code[$er_code_id] . '</h3>'; + if ($config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']) { + $str[] = "<h3>{$config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']}: {$err_code[$er_code_id]}</h3>"; + } else { + $str[] = "<h3>Request denied by {$g['product_name']} proxy: {$err_code[$er_code_id]}</h3>"; + } if ($err_msg) $str[] = "<b> Reason: </b> $err_msg"; $str[] = '<hr size="1" noshade>'; if ($cl['a']) $str[] = "<b> Client address: </b> {$cl['a']} <br>"; |