Commit 36c8a26c authored by Michael Fürmann's avatar Michael Fürmann
Browse files

Clients limit update

parent fbe2d6b2
......@@ -122,6 +122,10 @@ class validate_client {
case 'mail_servers':
$used_servers = $app->db->queryAllRecords('SELECT domain_id FROM mail_domain INNER JOIN sys_user ON mail_domain.sys_userid = sys_user.userid WHERE client_id = ' . $client_id . ' AND server_id NOT IN (' . implode(', ', $field_value) . ');');
break;
case 'xmpp_servers':
$used_servers = $app->db->queryAllRecords('SELECT domain_id FROM xmpp_domain INNER JOIN sys_user ON xmpp_domain.sys_userid = sys_user.userid WHERE client_id = ' . $client_id . ' AND server_id NOT IN (' . implode(', ', $field_value) . ');');
break;
}
if ($used_servers === null || count($used_servers))
......
......@@ -782,9 +782,8 @@ $form["tabs"]['limits'] = array (
'class'=> 'custom_datasource',
'function'=> 'client_servers'
),
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'no_xmpp_server_error'),
1 => array ( 'type' => 'CUSTOM',
'validators' => array (
0 => array ( 'type' => 'CUSTOM',
'class' => 'validate_client',
'function' => 'check_used_servers',
'errmsg'=> 'xmpp_servers_used'),
......@@ -832,17 +831,6 @@ $form["tabs"]['limits'] = array (
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'limit_xmpp_auth_options' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOXARRAY',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'xmpp_auth_options_notempty'),
),
'default' => '',
'separator' => ',',
'valuelimit' => 'client:xmpp_auth_options',
'value' => array('plain' => 'Plain', 'hashed' => 'Hashed', 'isp' => 'By Mail Account')
),
'limit_xmpp_vjud' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......
......@@ -178,10 +178,8 @@ $wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.';
$wb['xmpp_servers_used'] = 'The server you are trying to remove from this client is used as a XMPP Server. Be sure that this server is not used by this client before you remove it.';
$wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.';
$wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.';
$wb['xmpp_auth_options_notempty'] = 'At least one XMPP auth method must be selected.';
$wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains';
$wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts';
$wb['xmpp_auth_options_txt'] = 'Available Auth options';
$wb['limit_xmpp_muc_txt'] = 'Multiuser chat available';
$wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available';
$wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available';
......
......@@ -55,6 +55,20 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$muc_available = $muc_pastebin_available = $muc_httparchive_available = $anon_available = $vjud_available = $proxy_available = $status_available = true;
if(!$app->auth->is_admin()) {
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT limit_xmpp_muc, limit_xmpp_anon, limit_xmpp_vjud, limit_xmpp_proxy, limit_xmpp_status, limit_xmpp_pastebin, limit_xmpp_httparchive FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
if($client['limit_xmpp_muc'] != 'y') $muc_available = false;
if($client['limit_xmpp_pastebin'] != 'y' || $client['limit_xmpp_muc'] != 'y') $muc_pastebin_available = false;
if($client['limit_xmpp_httparchive'] != 'y' || $client['limit_xmpp_muc'] != 'y') $muc_httparchive_available = false;
if($client['limit_xmpp_anon'] != 'y') $anon_available = false;
if($client['limit_xmpp_vjud'] != 'y') $vjud_available = false;
if($client['limit_xmpp_proxy'] != 'y') $proxy_available= false;
if($client['limit_xmpp_status'] != 'y') $status_available = false;
}
$form["tabs"]['domain'] = array (
'title' => "Domain",
'width' => 100,
......@@ -149,7 +163,6 @@ $form["tabs"]['domain'] = array (
)
);
$form["tabs"]['features'] = array (
'title' => "Modules",
'width' => 100,
......@@ -158,127 +171,139 @@ $form["tabs"]['features'] = array (
//#################################
// Begin Datatable fields
//#################################
'use_anon_host' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'use_pubsub' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'use_vjud' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'vjud_opt_mode' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '0',
'value' => array(0 => 'Opt-In', 1 => 'Opt-Out')
),
'use_proxy' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'use_status_host' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
)
//#################################
// ENDE Datatable fields
//#################################
)
);
if($anon_available)
$form['tabs']['features']['fields']['use_anon_host'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
if($vjud_available){
$form['tabs']['features']['fields']['use_vjud'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
$form['tabs']['features']['fields']['vjud_opt_mode'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '0',
'value' => array(0 => 'Opt-In', 1 => 'Opt-Out')
);
}
$form["tabs"]['muc'] = array (
'title' => "MUC",
'width' => 100,
'template' => "templates/xmpp_domain_edit_muc.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'use_muc_host' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'muc_name' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => ''
),
'muc_restrict_room_creation' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '1',
'value' => array(0 => 'Everyone', 1 => 'Members', 2 => 'Admins')
),
'muc_admins' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'admin@service.com, superuser@service.com',
'value' => '',
'width' => '15',
'maxlength' => '3'
),
'use_pastebin' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'pastebin_expire_after' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '48',
'validators' => array(0 => array('type' => 'ISINT'),
array('type'=>'RANGE', 'range'=>'1:168')
if($proxy_available)
$form['tabs']['features']['fields']['use_proxy'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
if($status_available)
$form['tabs']['features']['fields']['use_status_host'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
if($muc_available)
$form["tabs"]['muc'] = array (
'title' => "MUC",
'width' => 100,
'template' => "templates/xmpp_domain_edit_muc.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'use_muc_host' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'value' => '',
'width' => '15'
),
'pastebin_trigger' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '!paste',
'value' => '',
'width' => '15'
),
'use_http_archive' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'http_archive_show_join' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'http_archive_show_status' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
'muc_name' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => ''
),
'muc_restrict_room_creation' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '1',
'value' => array(0 => 'Everyone', 1 => 'Members', 2 => 'Admins')
),
'muc_admins' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'admin@service.com, superuser@service.com',
'value' => '',
'width' => '15',
'maxlength' => '3'
),
//#################################
// ENDE Datatable fields
//#################################
)
);
if($muc_available && $muc_pastebin_available){
$form['tabs']['muc']['fields']['use_pastebin'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
$form['tabs']['muc']['fields']['pastebin_expire_after'] = array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '48',
'validators' => array(0 => array('type' => 'ISINT'),
array('type'=>'RANGE', 'range'=>'1:168')
),
//#################################
// ENDE Datatable fields
//#################################
)
);
'value' => '',
'width' => '15'
);
$form['tabs']['muc']['fields']['pastebin_trigger'] = array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '!paste',
'value' => '',
'width' => '15'
);
}
if($muc_available && $muc_httparchive_available){
$form['tabs']['muc']['fields']['use_http_archive'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
$form['tabs']['muc']['fields']['http_archive_show_join'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
$form['tabs']['muc']['fields']['http_archive_show_status'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
);
}
$form["tabs"]['ssl'] = array (
'title' => "SSL",
......
......@@ -58,4 +58,5 @@ $wb['save_certificate_txt'] = 'Save certificate';
$wb['create_certificate_txt'] = 'Create certificate';
$wb['delete_certificate_txt'] = 'Delete certificate';
$wb['ssl_error_isemail'] = 'Please enter a valid email adress for generation of the SSL certificate';
$wb["limit_xmppdomain_txt"] = 'The max. number of XMPP domains for your account is reached.';
?>
......@@ -151,7 +151,7 @@ if($app->auth->get_client_limit($userid, 'fetchmail') != 0)
//**** XMPP Menu
$items = array();
if($app->auth->get_client_limit($userid, 'xmppdomain') != 0)
if($app->auth->get_client_limit($userid, 'xmpp_domain') != 0)
{
$items[] = array( 'title' => 'XMPP Domain',
'target' => 'content',
......@@ -159,7 +159,7 @@ if($app->auth->get_client_limit($userid, 'xmppdomain') != 0)
'html_id' => 'xmpp_domain_list');
}
if($app->auth->get_client_limit($userid, 'xmppaccount') != 0)
if($app->auth->get_client_limit($userid, 'xmpp_user') != 0)
{
$items[] = array( 'title' => 'XMPP Account',
'target' => 'content',
......
......@@ -4,43 +4,50 @@
<p><tmpl_var name="list_desc_txt"></p>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_anon_host_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_anon_host'}
<tmpl_if name="limit_xmpp_anon" value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_anon_host_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_anon_host'}
</div>
</div>
</div>
</tmpl_if>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_pubsub_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_pubsub'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_vjud_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_vjud'}
<tmpl_if name="limit_xmpp_vjud" value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_vjud_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_vjud'}
</div>
</div>
</div>
<div class="form-group">
<label for="vjud_opt_mode" class="col-sm-3 control-label">{tmpl_var name='vjud_opt_mode_txt'}</label>
<div class="col-sm-3"><select name="vjud_opt_mode" id="vjud_opt_mode" class="form-control">
{tmpl_var name='vjud_opt_mode'}
</select></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_proxy_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_proxy'}
<div class="form-group">
<label for="vjud_opt_mode" class="col-sm-3 control-label">{tmpl_var name='vjud_opt_mode_txt'}</label>
<div class="col-sm-3"><select name="vjud_opt_mode" id="vjud_opt_mode" class="form-control">
{tmpl_var name='vjud_opt_mode'}
</select></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_status_host_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_status_host'}
</tmpl_if>
<tmpl_if name="limit_xmpp_proxy" value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_proxy_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_proxy'}
</div>
</div>
</div>
</tmpl_if>
<tmpl_if name="limit_xmpp_status" value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_status_host_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_status_host'}
</div>
</div>
</tmpl_if>
......
......@@ -33,47 +33,51 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_pastebin_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_pastebin'}
</div>
</div>
<div id="toggle-use-pastebin" class="collapse">
<tmpl_if name='limit_xmpp_pastebin' value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='pastebin_expire_after_txt'}</label>
<div class="col-sm-3">
<input type="number" name="pastebin_expire_after" id="pastebin_expire_after" value="{tmpl_var name='pastebin_expire_after'}" class="form-control" />
<label class="col-sm-3 control-label">{tmpl_var name='use_pastebin_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_pastebin'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='pastebin_trigger_txt'}</label>
<div class="col-sm-3">
<input type="text" name="pastebin_trigger" id="pastebin_trigger" value="{tmpl_var name='pastebin_trigger'}" class="form-control" />
<div id="toggle-use-pastebin" class="collapse">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='pastebin_expire_after_txt'}</label>
<div class="col-sm-3">
<input type="number" name="pastebin_expire_after" id="pastebin_expire_after" value="{tmpl_var name='pastebin_expire_after'}" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='pastebin_trigger_txt'}</label>
<div class="col-sm-3">
<input type="text" name="pastebin_trigger" id="pastebin_trigger" value="{tmpl_var name='pastebin_trigger'}" class="form-control" />
</div>
</div>
</div>
</div>
</tmpl_if>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='use_http_archive_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='use_http_archive'}
</div>
</div>
<div id="toggle-use-archive" class="collapse">
<tmpl_if name='limit_xmpp_httparchive' value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='http_archive_show_join_txt'}</label>
<label class="col-sm-3 control-label">{tmpl_var name='use_http_archive_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='http_archive_show_join'}
{tmpl_var name='use_http_archive'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='http_archive_show_status_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='http_archive_show_status'}
<div id="toggle-use-archive" class="collapse">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='http_archive_show_join_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='http_archive_show_join'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='http_archive_show_status_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='http_archive_show_status'}
</div>
</div>
</div>
</div>
</tmpl_if>
</div>
......
......@@ -72,18 +72,18 @@ class page_action extends tform_actions {
// we will check only users, not admins
if($_SESSION["s"]["user"]["typ"] == 'user') {
if(!$app->tform->checkClientLimit('limit_xmppdomain')) {
if(!$app->tform->checkClientLimit('limit_xmpp_domain')) {
$app->error($app->tform->wordbook["limit_xmppdomain_txt"]);
}
if(!$app->tform->checkResellerLimit('limit_xmppdomain')) {
if(!$app->tform->checkResellerLimit('limit_xmpp_domain')) {
$app->error('Reseller: '.$app->tform->wordbook["limit_xmppdomain_txt"]);
}
} else {
$settings = $app->getconf->get_global_config('xmpp');
$app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = intval($settings['default_xmppserver']);
}
}
$app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = intval($settings['default_xmppserver']);
parent::onShowNew();
parent::onShowNew();
}
function onShowEnd() {
......@@ -92,6 +92,17 @@ class page_action extends tform_actions {
$app->uses('ini_parser,getconf');
$settings = $app->getconf->get_global_config('domains');
$read_limits = array('limit_xmpp_pastebin', 'limit_xmpp_httparchive', 'limit_xmpp_anon', 'limit_xmpp_vjud', 'limit_xmpp_proxy', 'limit_xmpp_status');
if($_SESSION["s"]["user"]["typ"] != 'admin') {
$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
$client = $app->db->queryOneRecord("SELECT client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// add limits to template to be able to hide settings
foreach($read_limits as $limit) $app->tpl->setVar($limit, $client[$limit]);
}else{
foreach($read_limits as $limit) $app->tpl->setVar($limit, 'y');
}
if($_SESSION["s"]["user"]["typ"] == 'admin' && $settings['use_domain_module'] != 'y') {
// Getting Clients of the user
$sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
......@@ -112,12 +123,7 @@ class page_action extends tform_actions {
// Get the limits of the client
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, client.default_xmppserver, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by client.contact_name");
// Set the xmppserver to the default server of the client
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_xmppserver]");
$app->tpl->setVar("server_id", "<option value='$client[default_xmppserver]'>$tmp[server_name]</option>");
unset($tmp);
$client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by client.contact_name");
if ($settings['use_domain_module'] != 'y') {
// Fill the client select field
......@@ -233,7 +239,7 @@ class page_action extends tform_actions {
if($_SESSION["s"]["user"]["typ"] != 'admin') {
// Get the limits of the client
$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
$client = $app->db->queryOneRecord("SELECT limit_xmppdomain, default_xmppserver 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_xmpp_domain FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// When the record is updated
if($this->id > 0) {
// restore the server ID if the user is not admin and record is edited
......@@ -249,9 +255,9 @@ class page_action extends tform_actions {
$app->error($app->tform->wordbook['error_not_allowed_server_id']);
}
if($client["limit_xmppdomain"] >= 0) {
if($client["limit_xmpp_domain"] >= 0) {
$tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM xmpp_domain WHERE sys_groupid = $client_group_id");
if($tmp["number"] >= $client["limit_xmppdomain"]) {
if($tmp["number"] >= $client["limit_xmpp_domain"]) {
$app->error($app->tform->wordbook["limit_xmppdomain_txt"]);