aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy/haproxy_pool_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/haproxy/haproxy_pool_edit.php')
-rwxr-xr-xconfig/haproxy/haproxy_pool_edit.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/haproxy/haproxy_pool_edit.php b/config/haproxy/haproxy_pool_edit.php
index 4da508f2..6feab2ff 100755
--- a/config/haproxy/haproxy_pool_edit.php
+++ b/config/haproxy/haproxy_pool_edit.php
@@ -71,7 +71,11 @@ if ($_POST) {
$reqdfields = explode(" ", "name");
$reqdfieldsn = explode(",", "Name");
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version < 2.1)
+ $input_errors = eval('do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); return $input_errors;');
+ else
+ do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['name']))
$input_errors[] = "The field 'Name' contains invalid characters.";