Skip to content

Commit a7d8045

Browse files
committed
Review 0.1
1 parent 36c8a26 commit a7d8045

File tree

15 files changed

+428
-58
lines changed

15 files changed

+428
-58
lines changed

install/sql/incremental/upd_0081.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ALTER TABLE `server` ADD COLUMN `xmpp_server` tinyint(1) NOT NULL default '0' AFTER `firewall_server`;
22

33
ALTER TABLE `client`
4+
ADD COLUMN `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
5+
ADD COLUMN `xmpp_servers` blob,
46
ADD COLUMN `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
57
ADD COLUMN `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1',
68
ADD COLUMN `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n',

install/sql/ispconfig3.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ CREATE TABLE `client` (
184184
`limit_spamfilter_wblist` int(11) NOT NULL DEFAULT '0',
185185
`limit_spamfilter_user` int(11) NOT NULL DEFAULT '0',
186186
`limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0',
187+
`default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
188+
`xmpp_servers` blob,
187189
`limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
188190
`limit_xmpp_user` int(11) NOT NULL DEFAULT '-1',
189191
`limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n',

interface/web/client/form/client.tform.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,17 @@
773773
'rows' => '',
774774
'cols' => ''
775775
),
776+
'default_xmppserver' => array (
777+
'datatype' => 'INTEGER',
778+
'formtype' => 'SELECT',
779+
'default' => '1',
780+
'datasource' => array ( 'type' => 'CUSTOM',
781+
'class'=> 'custom_datasource',
782+
'function'=> 'client_servers'
783+
),
784+
'value' => '',
785+
'name' => 'default_xmppserver'
786+
),
776787
'xmpp_servers' => array (
777788
'datatype' => 'VARCHAR',
778789
'formtype' => 'MULTIPLE',

interface/web/client/form/client_template.tform.php

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,105 @@
322322
'rows' => '',
323323
'cols' => ''
324324
),
325+
'default_xmppserver' => array (
326+
'datatype' => 'INTEGER',
327+
'formtype' => 'SELECT',
328+
'default' => '1',
329+
'datasource' => array ( 'type' => 'CUSTOM',
330+
'class'=> 'custom_datasource',
331+
'function'=> 'client_servers'
332+
),
333+
'value' => '',
334+
'name' => 'default_xmppserver'
335+
),
336+
'xmpp_servers' => array (
337+
'datatype' => 'VARCHAR',
338+
'formtype' => 'MULTIPLE',
339+
'separator' => ',',
340+
'default' => '1',
341+
'datasource' => array ( 'type' => 'CUSTOM',
342+
'class'=> 'custom_datasource',
343+
'function'=> 'client_servers'
344+
),
345+
'validators' => array (
346+
0 => array ( 'type' => 'CUSTOM',
347+
'class' => 'validate_client',
348+
'function' => 'check_used_servers',
349+
'errmsg'=> 'xmpp_servers_used'),
350+
),
351+
'value' => '',
352+
'name' => 'xmpp_servers'
353+
),
354+
'limit_xmpp_domain' => array(
355+
'datatype' => 'INTEGER',
356+
'formtype' => 'TEXT',
357+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
358+
'errmsg'=> 'limit_xmpp_domain_error_notint'),
359+
),
360+
'default' => '-1',
361+
'value' => '',
362+
'separator' => '',
363+
'width' => '10',
364+
'maxlength' => '10',
365+
'rows' => '',
366+
'cols' => ''
367+
),
368+
'limit_xmpp_user' => array(
369+
'datatype' => 'INTEGER',
370+
'formtype' => 'TEXT',
371+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
372+
'errmsg'=> 'limit_xmpp_user_error_notint'),
373+
),
374+
'default' => '-1',
375+
'value' => '',
376+
'separator' => '',
377+
'width' => '10',
378+
'maxlength' => '10',
379+
'rows' => '',
380+
'cols' => ''
381+
),
382+
'limit_xmpp_muc' => array(
383+
'datatype' => 'VARCHAR',
384+
'formtype' => 'CHECKBOX',
385+
'default' => 'n',
386+
'value' => array(0 => 'n', 1 => 'y')
387+
),
388+
'limit_xmpp_anon' => array(
389+
'datatype' => 'VARCHAR',
390+
'formtype' => 'CHECKBOX',
391+
'default' => 'n',
392+
'value' => array(0 => 'n', 1 => 'y')
393+
),
394+
'limit_xmpp_vjud' => array(
395+
'datatype' => 'VARCHAR',
396+
'formtype' => 'CHECKBOX',
397+
'default' => 'n',
398+
'value' => array(0 => 'n', 1 => 'y')
399+
),
400+
'limit_xmpp_proxy' => array(
401+
'datatype' => 'VARCHAR',
402+
'formtype' => 'CHECKBOX',
403+
'default' => 'n',
404+
'value' => array(0 => 'n', 1 => 'y')
405+
),
406+
'limit_xmpp_status' => array(
407+
'datatype' => 'VARCHAR',
408+
'formtype' => 'CHECKBOX',
409+
'default' => 'n',
410+
'value' => array(0 => 'n', 1 => 'y')
411+
),
412+
'limit_xmpp_pastebin' => array(
413+
'datatype' => 'VARCHAR',
414+
'formtype' => 'CHECKBOX',
415+
'default' => 'n',
416+
'value' => array(0 => 'n', 1 => 'y')
417+
),
418+
'limit_xmpp_httparchive' => array(
419+
'datatype' => 'VARCHAR',
420+
'formtype' => 'CHECKBOX',
421+
'default' => 'n',
422+
'value' => array(0 => 'n', 1 => 'y')
423+
),
325424
'default_webserver' => array (
326425
'datatype' => 'INTEGER',
327426
'formtype' => 'SELECT',

interface/web/client/form/reseller.tform.php

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,105 @@
769769
'rows' => '',
770770
'cols' => ''
771771
),
772+
'default_xmppserver' => array (
773+
'datatype' => 'INTEGER',
774+
'formtype' => 'SELECT',
775+
'default' => '1',
776+
'datasource' => array ( 'type' => 'CUSTOM',
777+
'class'=> 'custom_datasource',
778+
'function'=> 'client_servers'
779+
),
780+
'value' => '',
781+
'name' => 'default_xmppserver'
782+
),
783+
'xmpp_servers' => array (
784+
'datatype' => 'VARCHAR',
785+
'formtype' => 'MULTIPLE',
786+
'separator' => ',',
787+
'default' => '1',
788+
'datasource' => array ( 'type' => 'CUSTOM',
789+
'class'=> 'custom_datasource',
790+
'function'=> 'client_servers'
791+
),
792+
'validators' => array (
793+
0 => array ( 'type' => 'CUSTOM',
794+
'class' => 'validate_client',
795+
'function' => 'check_used_servers',
796+
'errmsg'=> 'xmpp_servers_used'),
797+
),
798+
'value' => '',
799+
'name' => 'xmpp_servers'
800+
),
801+
'limit_xmpp_domain' => array(
802+
'datatype' => 'INTEGER',
803+
'formtype' => 'TEXT',
804+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
805+
'errmsg'=> 'limit_xmpp_domain_error_notint'),
806+
),
807+
'default' => '-1',
808+
'value' => '',
809+
'separator' => '',
810+
'width' => '10',
811+
'maxlength' => '10',
812+
'rows' => '',
813+
'cols' => ''
814+
),
815+
'limit_xmpp_user' => array(
816+
'datatype' => 'INTEGER',
817+
'formtype' => 'TEXT',
818+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
819+
'errmsg'=> 'limit_xmpp_user_error_notint'),
820+
),
821+
'default' => '-1',
822+
'value' => '',
823+
'separator' => '',
824+
'width' => '10',
825+
'maxlength' => '10',
826+
'rows' => '',
827+
'cols' => ''
828+
),
829+
'limit_xmpp_muc' => array(
830+
'datatype' => 'VARCHAR',
831+
'formtype' => 'CHECKBOX',
832+
'default' => 'n',
833+
'value' => array(0 => 'n', 1 => 'y')
834+
),
835+
'limit_xmpp_anon' => array(
836+
'datatype' => 'VARCHAR',
837+
'formtype' => 'CHECKBOX',
838+
'default' => 'n',
839+
'value' => array(0 => 'n', 1 => 'y')
840+
),
841+
'limit_xmpp_vjud' => array(
842+
'datatype' => 'VARCHAR',
843+
'formtype' => 'CHECKBOX',
844+
'default' => 'n',
845+
'value' => array(0 => 'n', 1 => 'y')
846+
),
847+
'limit_xmpp_proxy' => array(
848+
'datatype' => 'VARCHAR',
849+
'formtype' => 'CHECKBOX',
850+
'default' => 'n',
851+
'value' => array(0 => 'n', 1 => 'y')
852+
),
853+
'limit_xmpp_status' => array(
854+
'datatype' => 'VARCHAR',
855+
'formtype' => 'CHECKBOX',
856+
'default' => 'n',
857+
'value' => array(0 => 'n', 1 => 'y')
858+
),
859+
'limit_xmpp_pastebin' => array(
860+
'datatype' => 'VARCHAR',
861+
'formtype' => 'CHECKBOX',
862+
'default' => 'n',
863+
'value' => array(0 => 'n', 1 => 'y')
864+
),
865+
'limit_xmpp_httparchive' => array(
866+
'datatype' => 'VARCHAR',
867+
'formtype' => 'CHECKBOX',
868+
'default' => 'n',
869+
'value' => array(0 => 'n', 1 => 'y')
870+
),
772871
'default_webserver' => array (
773872
'datatype' => 'INTEGER',
774873
'formtype' => 'SELECT',

interface/web/client/lib/lang/en_client_template.lng

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,21 @@ $wb['limit_domainmodule_txt'] = 'Domainmodule Limit';
9898
$wb['client_limits_txt'] = 'Client Limits';
9999
$wb['limit_database_quota_txt'] = 'Database quota';
100100
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
101+
102+
$wb["xmpp_limits_txt"] = 'XMPP Limits';
103+
$wb["xmpp_servers_txt"] = 'XMPP Servers';
104+
$wb["xmpp_servers_placeholder"] = 'Select XMPP Servers';
105+
$wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.';
106+
$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.';
107+
$wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.';
108+
$wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.';
109+
$wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains';
110+
$wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts';
111+
$wb['limit_xmpp_muc_txt'] = 'Multiuser chat available';
112+
$wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available';
113+
$wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available';
114+
$wb['limit_xmpp_anon_txt'] = 'Anonymous host available';
115+
$wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
116+
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
117+
$wb['limit_xmpp_status_txt'] = 'Status host available';
101118
?>

interface/web/client/lib/lang/en_reseller.lng

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,24 @@ $wb['customer_no_template_txt'] = 'Customer No. template';
172172
$wb['customer_no_template_error_regex_txt'] = 'The customer No. template contains invalid characters';
173173
$wb['customer_no_start_txt'] = 'Customer No. start value';
174174
$wb['customer_no_counter_txt'] = 'Customer No. counter';
175+
176+
$wb["xmpp_limits_txt"] = 'XMPP Limits';
177+
$wb["xmpp_servers_txt"] = 'XMPP Servers';
178+
$wb["xmpp_servers_placeholder"] = 'Select XMPP Servers';
179+
$wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.';
180+
$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.';
181+
$wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.';
182+
$wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.';
183+
$wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains';
184+
$wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts';
185+
$wb['limit_xmpp_muc_txt'] = 'Multiuser chat available';
186+
$wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available';
187+
$wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available';
188+
$wb['limit_xmpp_anon_txt'] = 'Anonymous host available';
189+
$wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
190+
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
191+
$wb['limit_xmpp_status_txt'] = 'Status host available';
192+
175193
$wb['added_by_txt'] = 'Added by';
176194
$wb['added_date_txt'] = 'Added date';
177195
$wb['limit_domainmodule_error_notint'] = 'Domainmodule limit must be a number.';

interface/web/client/templates/client_edit_limits.htm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,16 @@ <h1><tmpl_var name="list_head_txt"></h1>
219219
</div>
220220
<div class="form-group">
221221
<label for="limit_xmpp_domain" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_domain_txt'}</label>
222-
<div class="col-sm-9"><input type="text" name="limit_web_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div>
222+
<div class="col-sm-9"><input type="text" name="limit_xmpp_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div>
223223
<div class="form-group">
224224
<label for="limit_xmpp_user" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_user_txt'}</label>
225-
<div class="col-sm-9"><input type="text" name="limit_web_domain" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div>
226-
<div class="form-group">
225+
<div class="col-sm-9"><input type="text" name="limit_xmpp_user" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div>
226+
<!--<div class="form-group">
227227
<label class="col-sm-3 control-label">{tmpl_var name='xmpp_auth_options_txt'}</label>
228228
<div class="col-sm-9">
229229
{tmpl_var name='xmpp_auth_options'}
230230
</div>
231-
</div>
231+
</div>-->
232232
<div class="form-group">
233233
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_muc_txt'}</label>
234234
<div class="col-sm-9">

interface/web/client/templates/client_template_edit_limits.htm

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,71 @@ <h1><tmpl_var name="list_head_txt"></h1>
163163
<label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label>
164164
<div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div></div>
165165
</div>
166+
167+
<div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-xmpp_limits" aria-expanded="false" aria-controls="toggle-xmpp_limits">{tmpl_var name='xmpp_limits_txt'}</button></div>
168+
<div id="toggle-xmpp_limits" class="collapse">
169+
<div class="form-group">
170+
<label for="xmpp_servers" class="col-sm-3 control-label">{tmpl_var name='xmpp_servers_txt'}</label>
171+
<div class="col-sm-9"><select data-placeholder="{tmpl_var name='xmpp_servers_placeholder'}" multiple name="xmpp_servers[]" id="xmpp_servers" class="form-control">
172+
{tmpl_var name='xmpp_servers'}
173+
</select></div>
174+
</div>
175+
<div class="form-group">
176+
<label for="limit_xmpp_domain" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_domain_txt'}</label>
177+
<div class="col-sm-9"><input type="text" name="limit_xmpp_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div>
178+
<div class="form-group">
179+
<label for="limit_xmpp_user" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_user_txt'}</label>
180+
<div class="col-sm-9"><input type="text" name="limit_xmpp_user" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div>
181+
<!--<div class="form-group">
182+
<label class="col-sm-3 control-label">{tmpl_var name='xmpp_auth_options_txt'}</label>
183+
<div class="col-sm-9">
184+
{tmpl_var name='xmpp_auth_options'}
185+
</div>
186+
</div>-->
187+
<div class="form-group">
188+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_muc_txt'}</label>
189+
<div class="col-sm-9">
190+
{tmpl_var name='limit_xmpp_muc'}
191+
</div>
192+
</div>
193+
<div class="form-group">
194+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_pastebin_txt'}</label>
195+
<div class="col-sm-9">
196+
{tmpl_var name='limit_xmpp_pastebin'}
197+
</div>
198+
</div>
199+
<div class="form-group">
200+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_httparchive_txt'}</label>
201+
<div class="col-sm-9">
202+
{tmpl_var name='limit_xmpp_httparchive'}
203+
</div>
204+
</div>
205+
<div class="form-group">
206+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_anon_txt'}</label>
207+
<div class="col-sm-9">
208+
{tmpl_var name='limit_xmpp_anon'}
209+
</div>
210+
</div>
211+
<div class="form-group">
212+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_vjud_txt'}</label>
213+
<div class="col-sm-9">
214+
{tmpl_var name='limit_xmpp_vjud'}
215+
</div>
216+
</div>
217+
<div class="form-group">
218+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_proxy_txt'}</label>
219+
<div class="col-sm-9">
220+
{tmpl_var name='limit_xmpp_proxy'}
221+
</div>
222+
</div>
223+
<div class="form-group">
224+
<label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_status_txt'}</label>
225+
<div class="col-sm-9">
226+
{tmpl_var name='limit_xmpp_status'}
227+
</div>
228+
</div>
229+
230+
</div>
166231
<div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-database_limits" aria-expanded="false" aria-controls="toggle-database_limits">{tmpl_var name='database_limits_txt'}</button></div>
167232
<div id="toggle-database_limits" class="collapse">
168233
<div class="form-group">

0 commit comments

Comments
 (0)