From 4ccc7282f3f3cd1db0a5fc153c03baf824828e6f Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 3 Oct 2015 09:25:12 +0200 Subject: Move javascript helpers to a separate file squid.inc is already huge enough as it is, without bloating it even more. --- config/squid3/34/squid.inc | 200 +-------------------------------------------- 1 file changed, 4 insertions(+), 196 deletions(-) (limited to 'config/squid3') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index ae367d3a..a40dd551 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -41,6 +41,10 @@ require_once('service-utils.inc'); if (!function_exists("filter_configure")) { require_once("filter.inc"); } +/* Squid reverse proxy */ +require_once('/usr/local/pkg/squid_reverse.inc'); +/* Squid javascript helpers */ +require_once('/usr/local/pkg/squid_js.inc'); $shortcut_section = "squid"; @@ -1850,9 +1854,6 @@ function squid_get_server_certs() { return $cert_arr; } -// squid reverse -include('/usr/local/pkg/squid_reverse.inc'); - function squid_resync_auth() { global $config, $valid_acls; $write_config = 0; @@ -2318,199 +2319,6 @@ function squid_restart_antivirus() { } } -function squid_print_javascript_auth() { - global $config; - $transparent_proxy = ($config['installedpackages']['squid']['config'][0]['transparent_proxy'] == 'on'); - - // No authentication for transparent proxy - if ($transparent_proxy and preg_match("/(local|ldap|radius|msnt|ntlm)/",$config['installedpackages']['squidauth']['config'][0]['auth_method'])) { - $javascript = <<< EOD - - -EOD; - } else { - $javascript = <<< EOD - - -EOD; - } - - print($javascript); -} - -function squid_print_javascript_auth2() { - print("\n"); -} - -function squid_print_antivirus_advanced_config() { - $javascript = <<< EOD - - -EOD; - print($javascript); - -} - -function squid_print_antivirus_advanced_config2() { - print('\n'); -} - function squid_generate_rules($type) { global $config, $pfs_version; -- cgit v1.2.3