diff options
author | jim-p <jimp@pfsense.org> | 2014-09-23 08:13:18 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-09-23 08:13:18 -0400 |
commit | 91f558f5bb14486b053ad9fb2a0f24b527665b59 (patch) | |
tree | 29b5e3ff6d0d779f378b997320199aad2088ee21 /config/haproxy-devel/haproxy_pool_edit.php | |
parent | 5de466966718de28d50e84f5e7a6b4560aaf643f (diff) | |
parent | d2db08d5449698dcb3e98bcd58b39e8ff4cc23b0 (diff) | |
download | pfsense-packages-91f558f5bb14486b053ad9fb2a0f24b527665b59.tar.gz pfsense-packages-91f558f5bb14486b053ad9fb2a0f24b527665b59.tar.bz2 pfsense-packages-91f558f5bb14486b053ad9fb2a0f24b527665b59.zip |
Merge pull request #704 from PiBa-NL/haproxy_1.5.3_extra
Diffstat (limited to 'config/haproxy-devel/haproxy_pool_edit.php')
-rw-r--r-- | config/haproxy-devel/haproxy_pool_edit.php | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/config/haproxy-devel/haproxy_pool_edit.php b/config/haproxy-devel/haproxy_pool_edit.php index aa1fa5da..a3a0879d 100644 --- a/config/haproxy-devel/haproxy_pool_edit.php +++ b/config/haproxy-devel/haproxy_pool_edit.php @@ -196,26 +196,16 @@ if ($_POST) { $reqdfields = explode(" ", "name"); $reqdfieldsn = explode(",", "Name"); - $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); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); if ($_POST['stats_enabled']) { $reqdfields = explode(" ", "name stats_uri"); $reqdfieldsn = explode(",", "Name,Stats Uri"); - 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); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); if ($_POST['stats_username']) { $reqdfields = explode(" ", "stats_password stats_realm"); $reqdfieldsn = explode(",", "Stats Password,Stats Realm"); - 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); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); } } @@ -317,7 +307,7 @@ if ($_POST) { } else { $a_pools[] = $pool; } - if (!$input_errors) { + if (!isset($input_errors)) { if ($changecount > 0) { touch($d_haproxyconfdirty_path); write_config($changedesc); @@ -334,10 +324,6 @@ if ($_POST) { $pconfig['a_servers']=&$a_pools[$id]['ha_servers']['item']; } -$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); -if ($pf_version < 2.0) - $one_two = true; - $closehead = false; $pgtitle = "HAProxy: Backend server pool: Edit"; include("head.inc"); @@ -453,10 +439,7 @@ foreach($simplefields as $field){ } </script> <?php include("fbegin.inc"); ?> -<?php if ($input_errors) print_input_errors($input_errors); ?> -<?php if($one_two): ?> -<p class="pgtitle"><?=$pgtitle?></p> -<?php endif; ?> +<?php if (isset($input_errors)) print_input_errors($input_errors); ?> <form action="haproxy_pool_edit.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> |