From 8e2350446a781758916dc7e17030b891f6dfd7c2 Mon Sep 17 00:00:00 2001 From: jim-p Date: Sun, 19 Apr 2009 18:46:57 -0400 Subject: Fix Squid Port check, so WebGUI and Squid ports can't overlap. Fixes Ticket #1907 The actual test was already there, but the $port variable wasn't properly set beforehand. This should be a non-issue for people who just check "Transparent" and leave squid on the default port. People who get bit by this seem to also set squid's main port to 80 instead of the default. --- config/squid/squid.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config/squid/squid.inc') diff --git a/config/squid/squid.inc b/config/squid/squid.inc index c0dc5a06..dbd8267f 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -285,6 +285,10 @@ function squid_before_form_general($pkg) { function squid_validate_general($post, $input_errors) { global $config; + $settings = $config['installedpackages']['squid']['config'][0]; + $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); + $port = $post['proxy_port'] ? $post['proxy_port'] : $port; + $icp_port = trim($post['icp_port']); if (!empty($icp_port) && !is_port($icp_port)) $input_errors[] = 'You must enter a valid port number in the \'ICP port\' field'; -- cgit v1.2.3