From ecb6b3a8035679f652ed0d80ca624d8a0c6c57f1 Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Wed, 22 Aug 2012 14:13:12 -0400 Subject: [PATCH] - Added database, database_user and vhost subdomain functions to the remoting - Added interface plugins for db and db users - changed remoting (splitted up insert, update and deletequery) --- 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