From b0ebbdedaa0805599b97a9d3bbc96c0a5cf2bbac Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 21 Mar 2010 06:04:32 -0400
Subject: [PATCH] Fixed: FS#1124 - Traffic quota on some systems not working

---
 interface/web/sites/form/web_domain.tform.php |   39 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php
index 882a784..1d79412 100644
--- a/interface/web/sites/form/web_domain.tform.php
+++ b/interface/web/sites/form/web_domain.tform.php
@@ -139,7 +139,6 @@
 			'width'		=> '7',
 			'maxlength'	=> '7'
 		),
-		/*
 		'traffic_quota' => array (
 			'datatype'	=> 'INTEGER',
 			'formtype'	=> 'TEXT',
@@ -151,7 +150,6 @@
 			'width'		=> '7',
 			'maxlength'	=> '7'
 		),
-		*/
 		'cgi' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'CHECKBOX',
@@ -225,6 +223,10 @@
 		),
 		'redirect_path' => array (
 			'datatype'	=> 'VARCHAR',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+														'errmsg'=> 'redirect_error_regex'),
+									),
 			'formtype'	=> 'TEXT',
 			'default'	=> '',
 			'value'		=> '',
@@ -249,6 +251,10 @@
 		'ssl_state' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_state_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -257,6 +263,10 @@
 		'ssl_locality' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_locality_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -265,6 +275,10 @@
 		'ssl_organisation' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_organisation_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -273,6 +287,10 @@
 		'ssl_organisation_unit' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_organistaion_unit_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -281,6 +299,10 @@
 		'ssl_country' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([A-Z]{2,2}))$/',
+														'errmsg'=> 'ssl_country_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '2',
@@ -403,7 +425,18 @@
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'NOTEMPTY',
-														'errmsg'=> 'documentroot_error_empty'),
+														'errmsg'=> 'allow_override_error_empty'),
+									),
+			'default'	=> 'All',
+			'value'		=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255'
+		),
+		'php_open_basedir' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'NOTEMPTY',
+														'errmsg'=> 'php_open_basedir_error_empty'),
 									),
 			'default'	=> 'All',
 			'value'		=> '',

--
Gitblit v1.9.1