From f3e6c510cdfee3ef9c6bee0a7e2e35c9c0be0fe4 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 30 Oct 2012 06:23:01 -0400
Subject: [PATCH] Fixed: FS#2499 - "FastCGI max. Requests" cannot be set to zero (0) in System -> Server Config -> FastCGI tab

---
 interface/lib/classes/validate_client.inc.php |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/interface/lib/classes/validate_client.inc.php b/interface/lib/classes/validate_client.inc.php
index 97b9221..9b0546a 100644
--- a/interface/lib/classes/validate_client.inc.php
+++ b/interface/lib/classes/validate_client.inc.php
@@ -65,6 +65,36 @@
 		}
 	}
 	
+	function username_collision($field_name, $field_value, $validator) {
+		global $app;
+		
+		if(isset($app->remoting_lib->primary_id)) {
+			$client_id = $app->remoting_lib->primary_id;
+		} else {
+			$client_id = $app->tform->primary_id;
+		}
+		
+		$app->uses('getconf');
+		$global_config = $app->getconf->get_global_config('sites');
+		
+		if((trim($field_value) == 'web' || preg_match('/^web[0-9]/',$field_value)) && 
+		  ($global_config['ftpuser_prefix'] == '[CLIENTNAME]' || 
+		   $global_config['ftpuser_prefix'] == '' ||
+		   $global_config['shelluser_prefix'] == '[CLIENTNAME]' ||
+		   $global_config['shelluser_prefix'] == '' )) {
+			$errmsg = $validator['errmsg'];
+			if(isset($app->tform->wordbook[$errmsg])) {
+				return $app->tform->wordbook[$errmsg]."<br>\r\n";
+			} else {
+				return $errmsg."<br>\r\n";
+			}
+		}
+		
+		
+		
+		
+	}
+	
 	
 	
 	

--
Gitblit v1.9.1