From 32dcc8752f280299f0e364ccebcc092db8f2cb4e Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 05 Apr 2016 12:17:42 -0400
Subject: [PATCH] Changed autodetect messages from WARN to INFO in non forced mode.

---
 interface/web/sites/form/web_vhost_domain.tform.php |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index e0b3a03..8e40f82 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -48,12 +48,12 @@
 		$vhostdomain_type = 'subdomain';
 		$form_title = "Subdomain";
 		$validator_function = 'sub_domain';
-		$first_tab_title = "Subomain";
+		$first_tab_title = "Subdomain";
 	} elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
 		$vhostdomain_type = 'aliasdomain';
 		$form_title = "Aliasdomain";
 		$validator_function = 'alias_domain';
-		$first_tab_title = "Aliasomain";
+		$first_tab_title = "Aliasdomain";
 	}
 }
 
@@ -88,10 +88,11 @@
 $backup_available = ($vhostdomain_type == 'domain');
 if(!$app->auth->is_admin()) {
 	$client_group_id = $_SESSION["s"]["user"]["default_group"];
-	$client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl, limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+	$client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl, limit_ssl_letsencrypt, limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
 
 	if($client['limit_wildcard'] != 'y') $wildcard_available = false;
 	if($client['limit_ssl'] != 'y') $ssl_available = false;
+	if($client['limit_ssl_letsencrypt'] == 'y') $ssl_available = false;
 	if($client['limit_backup'] != 'y') $backup_available = false;
 }
 
@@ -342,6 +343,18 @@
 			'errmsg'=> 'domain_error_autosub'
 		),
 	);
+	$form['tabs']['domain']['fields']['web_folder'] = array (
+		'datatype' => 'VARCHAR',
+		'validators' => array (  0 => array ( 'type' => 'REGEX',
+				'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
+				'errmsg'=> 'web_folder_error_regex'),
+		),
+		'formtype' => 'TEXT',
+		'default' => '',
+		'value'  => '',
+		'width'  => '30',
+		'maxlength' => '255'
+	);
 } else {
 	$form['tabs']['domain']['fields']['parent_domain_id']['datasource'] = array (
 		'type' => 'SQL',
@@ -352,7 +365,7 @@
 	$form['tabs']['domain']['fields']['web_folder'] = array (
 		'datatype' => 'VARCHAR',
 		'validators' => array (  0 => array ( 'type' => 'REGEX',
-				'regex' => '@^((?!.*\.\.)[\w/_\.\-]{1,100})$@',
+				'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
 				'errmsg'=> 'web_folder_error_regex'),
 		),
 		'formtype' => 'TEXT',
@@ -435,7 +448,7 @@
 				'datatype' => 'VARCHAR',
 				'formtype' => 'TEXT',
 				'validators' => array (  0 => array ( 'type' => 'REGEX',
-						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
 						'errmsg'=> 'ssl_state_error_regex'),
 				),
 				'default' => '',
@@ -447,7 +460,7 @@
 				'datatype' => 'VARCHAR',
 				'formtype' => 'TEXT',
 				'validators' => array (  0 => array ( 'type' => 'REGEX',
-						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
 						'errmsg'=> 'ssl_locality_error_regex'),
 				),
 				'default' => '',
@@ -459,7 +472,7 @@
 				'datatype' => 'VARCHAR',
 				'formtype' => 'TEXT',
 				'validators' => array (  0 => array ( 'type' => 'REGEX',
-						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
 						'errmsg'=> 'ssl_organisation_error_regex'),
 				),
 				'default' => '',
@@ -471,7 +484,7 @@
 				'datatype' => 'VARCHAR',
 				'formtype' => 'TEXT',
 				'validators' => array (  0 => array ( 'type' => 'REGEX',
-						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+						'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
 						'errmsg'=> 'ssl_organistaion_unit_error_regex'),
 				),
 				'default' => '',

--
Gitblit v1.9.1