From 3b36926e21cc782d49780f3d447803334a8d9c9b Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 20 Jun 2014 16:09:43 -0300 Subject: Fix call-time pass by reference for all squid packages --- config/squid3/old/squid.inc | 14 +++++++------- config/squid3/old/squid.xml | 6 +++--- config/squid3/old/squid_auth.xml | 2 +- config/squid3/old/squid_cache.xml | 2 +- config/squid3/old/squid_nac.xml | 2 +- config/squid3/old/squid_traffic.xml | 2 +- config/squid3/old/squid_upstream.xml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'config/squid3/old') diff --git a/config/squid3/old/squid.inc b/config/squid3/old/squid.inc index 784fea8f..ce196700 100644 --- a/config/squid3/old/squid.inc +++ b/config/squid3/old/squid.inc @@ -289,7 +289,7 @@ function squid_deinstall_command() { filter_configure(); } -function squid_before_form_general($pkg) { +function squid_before_form_general(&$pkg) { $values = get_dir(SQUID_CONFBASE . '/errors/'); // Get rid of '..' and '.' array_shift($values); @@ -310,7 +310,7 @@ function squid_before_form_general($pkg) { $field['options']['option'][] = array('name' => $names[$i], 'value' => $values[$i]); } -function squid_validate_general($post, $input_errors) { +function squid_validate_general($post, &$input_errors) { global $config; $settings = $config['installedpackages']['squid']['config'][0]; $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); @@ -367,7 +367,7 @@ function squid_validate_general($post, $input_errors) { }} } -function squid_validate_upstream($post, $input_errors) { +function squid_validate_upstream($post, &$input_errors) { if ($post['proxy_forwarding'] == 'on') { $addr = trim($post['proxy_addr']); if (empty($addr)) @@ -389,7 +389,7 @@ function squid_validate_upstream($post, $input_errors) { } } -function squid_validate_cache($post, $input_errors) { +function squid_validate_cache($post, &$input_errors) { $num_fields = array( 'harddisk_cache_size' => 'Hard disk cache size', 'memory_cache_size' => 'Memory cache size', 'maximum_object_size' => 'Maximum object size', @@ -428,7 +428,7 @@ function squid_validate_cache($post, $input_errors) { } -function squid_validate_nac($post, $input_errors) { +function squid_validate_nac($post, &$input_errors) { $allowed_subnets = explode("\n", $post['allowed_subnets']); foreach ($allowed_subnets as $subnet) { $subnet = trim($subnet); @@ -466,7 +466,7 @@ function squid_validate_nac($post, $input_errors) { }} } -function squid_validate_traffic($post, $input_errors) { +function squid_validate_traffic($post, &$input_errors) { $num_fields = array( 'max_download_size' => 'Maximum download size', 'max_upload_size' => 'Maximum upload size', 'perhost_throttling' => 'Per-host bandwidth throttling', @@ -498,7 +498,7 @@ function squid_validate_traffic($post, $input_errors) { } -function squid_validate_auth($post, $input_errors) { +function squid_validate_auth($post, &$input_errors) { $num_fields = array( array('auth_processes', 'Authentication processes', 1), array('auth_ttl', 'Authentication TTL', 0), ); diff --git a/config/squid3/old/squid.xml b/config/squid3/old/squid.xml index 5762efb1..83fb9bc0 100644 --- a/config/squid3/old/squid.xml +++ b/config/squid3/old/squid.xml @@ -315,13 +315,13 @@ - squid_before_form_general(&$pkg); + squid_before_form_general($pkg); squid_resync(); - squid_validate_general($_POST, &$input_errors); + squid_validate_general($_POST, $input_errors); squid_resync(); @@ -339,4 +339,4 @@ exec("/bin/rm -f /usr/local/etc/rc.d/squid*"); squid_generate_rules - \ No newline at end of file + diff --git a/config/squid3/old/squid_auth.xml b/config/squid3/old/squid_auth.xml index c8e34553..db26756b 100644 --- a/config/squid3/old/squid_auth.xml +++ b/config/squid3/old/squid_auth.xml @@ -220,7 +220,7 @@ - squid_validate_auth($_POST, &$input_errors); + squid_validate_auth($_POST, $input_errors); squid_print_javascript_auth2(); diff --git a/config/squid3/old/squid_cache.xml b/config/squid3/old/squid_cache.xml index 881f15b3..a765d911 100644 --- a/config/squid3/old/squid_cache.xml +++ b/config/squid3/old/squid_cache.xml @@ -214,7 +214,7 @@ } - squid_validate_cache($_POST, &$input_errors); + squid_validate_cache($_POST, $input_errors); squid_resync(); diff --git a/config/squid3/old/squid_nac.xml b/config/squid3/old/squid_nac.xml index 193a89c6..0d914dca 100644 --- a/config/squid3/old/squid_nac.xml +++ b/config/squid3/old/squid_nac.xml @@ -135,7 +135,7 @@ - squid_validate_nac($_POST, &$input_errors); + squid_validate_nac($_POST, $input_errors); squid_resync(); diff --git a/config/squid3/old/squid_traffic.xml b/config/squid3/old/squid_traffic.xml index d560a7ad..f34eec19 100644 --- a/config/squid3/old/squid_traffic.xml +++ b/config/squid3/old/squid_traffic.xml @@ -169,7 +169,7 @@ - squid_validate_traffic($_POST, &$input_errors); + squid_validate_traffic($_POST, $input_errors); squid_resync(); diff --git a/config/squid3/old/squid_upstream.xml b/config/squid3/old/squid_upstream.xml index ad494524..b9a14dc8 100644 --- a/config/squid3/old/squid_upstream.xml +++ b/config/squid3/old/squid_upstream.xml @@ -125,7 +125,7 @@ - squid_validate_upstream($_POST, &$input_errors); + squid_validate_upstream($_POST, $input_errors); squid_resync(); -- cgit v1.2.3