diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-12-09 18:15:18 -0200 |
---|---|---|
committer | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-12-09 18:15:18 -0200 |
commit | 37adca57db41b835b80d8e9eea5545dd6cb694b1 (patch) | |
tree | 252ff04e5885f5e99852fe59b278e76e9e113a71 /config/varnish3/varnish.inc | |
parent | 694e9f735bb16c7fed83bb26ecaff2ec05a4e1ce (diff) | |
download | pfsense-packages-37adca57db41b835b80d8e9eea5545dd6cb694b1.tar.gz pfsense-packages-37adca57db41b835b80d8e9eea5545dd6cb694b1.tar.bz2 pfsense-packages-37adca57db41b835b80d8e9eea5545dd6cb694b1.zip |
varnish3 - fix save lb_director save error on pfsense 2.1
Diffstat (limited to 'config/varnish3/varnish.inc')
-rw-r--r-- | config/varnish3/varnish.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc index 983804c9..1895d214 100644 --- a/config/varnish3/varnish.inc +++ b/config/varnish3/varnish.inc @@ -65,8 +65,13 @@ function varnish_settings_post_validate($post, $input_errors) { } function varnish_lb_directors_post_validate($post, $input_errors) { - if (preg_match("/[^a-zA-Z0-9]/", $post['directorname'])) + if (preg_match("/[^a-zA-Z0-9]/", $post['directorname'])){ $input_errors[] = "The directorname name must only contain the characters a-Z or 0-9"; + } + else{ + if(empty($post['failover'])) + $_POST['failover'] = $post['directorname']; + } if(stristr($post['directorurl'], 'http')) $input_errors[] = "You do not need to include the http:// string in the director URL"; if($post['grace'] && ! preg_match("/^\d+(h|m|s)$/",$post['grace'])) |