diff options
Diffstat (limited to 'config/varnish3')
-rw-r--r-- | config/varnish3/varnish.inc | 6 | ||||
-rw-r--r-- | config/varnish3/varnish_backends.xml | 2 | ||||
-rw-r--r-- | config/varnish3/varnish_lb_directors.xml | 2 | ||||
-rw-r--r-- | config/varnish3/varnish_settings.xml | 2 | ||||
-rw-r--r-- | config/varnish3/varnish_view_config.php | 4 | ||||
-rw-r--r-- | config/varnish3/varnishstat.php | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc index 2a986710..4883af15 100644 --- a/config/varnish3/varnish.inc +++ b/config/varnish3/varnish.inc @@ -41,7 +41,7 @@ else define('VARNISH_LOCALBASE','/usr/local'); -function varnish_settings_post_validate($post, $input_errors) { +function varnish_settings_post_validate($post, &$input_errors) { if( !is_numeric($post['storagesize'])) $input_errors[] = "A valid number is required for the field 'Storage size'"; if($post['listeningport'] && !is_numeric($post['listeningport'])) @@ -64,7 +64,7 @@ function varnish_settings_post_validate($post, $input_errors) { } -function varnish_lb_directors_post_validate($post, $input_errors) { +function varnish_lb_directors_post_validate($post, &$input_errors) { if (preg_match("/[^a-zA-Z0-9]/", $post['directorname'])){ $input_errors[] = "The directorname name must only contain the characters a-Z or 0-9"; } @@ -78,7 +78,7 @@ function varnish_lb_directors_post_validate($post, $input_errors) { $input_errors[] = "A valid number with a time reference is required for the field 'Req grace'"; } -function varnish_backends_post_validate($post, $input_errors) { +function varnish_backends_post_validate($post, &$input_errors) { if (!$post['backendname'] || preg_match("/[^a-zA-Z0-9]/", $post['backendname'])) $input_errors[] = "The backend name must only contain the characters a-Z or 0-9"; if(!is_ipaddr($post['ipaddress'])) diff --git a/config/varnish3/varnish_backends.xml b/config/varnish3/varnish_backends.xml index b2214772..1bcb822c 100644 --- a/config/varnish3/varnish_backends.xml +++ b/config/varnish3/varnish_backends.xml @@ -305,6 +305,6 @@ varnish_start(); </custom_php_resync_config_command> <custom_php_validation_command> - varnish_backends_post_validate($_POST, &$input_errors); + varnish_backends_post_validate($_POST, $input_errors); </custom_php_validation_command> </packagegui> diff --git a/config/varnish3/varnish_lb_directors.xml b/config/varnish3/varnish_lb_directors.xml index b2a19ac3..1946860c 100644 --- a/config/varnish3/varnish_lb_directors.xml +++ b/config/varnish3/varnish_lb_directors.xml @@ -273,6 +273,6 @@ varnish_start(); </custom_php_resync_config_command> <custom_php_validation_command> - varnish_lb_directors_post_validate($_POST, &$input_errors); + varnish_lb_directors_post_validate($_POST, $input_errors); </custom_php_validation_command> </packagegui> diff --git a/config/varnish3/varnish_settings.xml b/config/varnish3/varnish_settings.xml index bbb8d321..a5ff5ef9 100644 --- a/config/varnish3/varnish_settings.xml +++ b/config/varnish3/varnish_settings.xml @@ -280,6 +280,6 @@ varnish_start(); </custom_php_resync_config_command> <custom_php_validation_command> - varnish_settings_post_validate($_POST, &$input_errors); + varnish_settings_post_validate($_POST, $input_errors); </custom_php_validation_command> </packagegui>
\ No newline at end of file diff --git a/config/varnish3/varnish_view_config.php b/config/varnish3/varnish_view_config.php index 15c68447..69a9fabb 100644 --- a/config/varnish3/varnish_view_config.php +++ b/config/varnish3/varnish_view_config.php @@ -29,8 +29,8 @@ require("guiconfig.inc"); -$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -if(strstr($pfSversion, "1.2")) +$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); +if ($pf_version < 2.0) $one_two = true; $pgtitle = "Varnish: View Configuration"; diff --git a/config/varnish3/varnishstat.php b/config/varnish3/varnishstat.php index 9fe3d77d..10d9ceb9 100644 --- a/config/varnish3/varnishstat.php +++ b/config/varnish3/varnishstat.php @@ -36,8 +36,8 @@ if($_REQUEST['getactivity']) { exit; } -$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -if(strstr($pfSversion, "1.2")) +$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); +if ($pf_version < 2.0) $one_two = true; $pgtitle = "Varnish: VarnishSTAT"; |