Skip to content

Commit 5a9c50a

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
Merged aliasdomain and subdomain files for easier code maintenance
2 parents 8828f85 + 3669b3c commit 5a9c50a

File tree

129 files changed

+2621
-4445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2621
-4445
lines changed

interface/web/admin/lib/lang/nl_system_config.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $wb['dblist_phpmyadmin_link_txt'] = 'Link naar phpmyadmin in DB lijst';
1818
$wb['mailboxlist_webmail_link_txt'] = 'Link naar webmail in Mailbox lijst';
1919
$wb['mailbox_show_autoresponder_tab_txt'] = 'Toon Autoresponder tabblad in Mailbox detail';
2020
$wb['mailbox_show_mail_filter_tab_txt'] = 'Toon Mail Filter tabblad in Mailbox detail';
21-
$wb['mailbox_show_custom_rules_tab_txt'] 'Toon Custom Rules tabblad in Mailbox detail';
21+
$wb['mailbox_show_custom_rules_tab_txt'] = 'Toon Custom Rules tabblad in Mailbox detail';
2222
$wb['webmail_url_txt'] = 'Webmail URL';
2323
$wb['phpmyadmin_url_txt'] = 'PHPMyAdmin URL';
2424
$wb['use_domain_module_txt'] = 'Gebruik de domein-module om nieuwe domeinen toe te voegen';

interface/web/sites/form/web_aliasdomain.tform.php renamed to interface/web/sites/form/web_childdomain.tform.php

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,18 @@
3737
3838
3939
*/
40+
$childdomain_type = 'aliasdomain';
41+
if(isset($_SESSION['s']['var']['childdomain_type']) && $_SESSION['s']['var']['childdomain_type'] == 'subdomain') $childdomain_type = 'subdomain';
4042

41-
$form["title"] = "Web Aliasdomain";
43+
$form["title"] = ($childdomain_type == 'subdomain' ? "Subdomain" : 'Web Aliasdomain');
4244
$form["description"] = "";
43-
$form["name"] = "web_aliasdomain";
44-
$form["action"] = "web_aliasdomain_edit.php";
45+
$form["name"] = "web_childdomain";
46+
$form["action"] = "web_childdomain_edit.php";
4547
$form["db_table"] = "web_domain";
4648
$form["db_table_idx"] = "domain_id";
4749
$form["db_history"] = "yes";
4850
$form["tab_default"] = "domain";
49-
$form["list_default"] = "web_aliasdomain_list.php";
51+
$form["list_default"] = "web_childdomain_list.php";
5052
$form["auth"] = 'yes'; // yes / no
5153

5254
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
@@ -58,7 +60,7 @@
5860
$form["tabs"]['domain'] = array (
5961
'title' => "Domain",
6062
'width' => 100,
61-
'template' => "templates/web_aliasdomain_edit.htm",
63+
'template' => "templates/web_childdomain_edit.htm",
6264
'fields' => array (
6365
//#################################
6466
// Begin Datatable fields
@@ -86,7 +88,7 @@
8688
),
8789
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
8890
'class' => 'validate_domain',
89-
'function' => 'alias_domain',
91+
'function' => ($childdomain_type == 'subdomain' ? 'sub_domain' : 'alias_domain'),
9092
'errmsg'=> 'domain_error_regex'),
9193
),
9294
'default' => '',
@@ -110,7 +112,8 @@
110112
'keyfield'=> 'domain_id',
111113
'valuefield'=> 'parent_domain'
112114
),
113-
'value' => ''
115+
'value' => '',
116+
'searchable' => 2
114117
),
115118
'redirect_type' => array (
116119
'datatype' => 'VARCHAR',
@@ -130,7 +133,21 @@
130133
'width' => '30',
131134
'maxlength' => '255'
132135
),
133-
'subdomain' => array (
136+
'active' => array (
137+
'datatype' => 'VARCHAR',
138+
'formtype' => 'CHECKBOX',
139+
'default' => 'y',
140+
'value' => array(0 => 'n', 1 => 'y')
141+
),
142+
//#################################
143+
// ENDE Datatable fields
144+
//#################################
145+
)
146+
);
147+
148+
if($childdomain_type == 'aliasdomain') {
149+
// additional fields for alias domains
150+
$form["tabs"]['domain']['fields']['subdomain'] = array (
134151
'datatype' => 'VARCHAR',
135152
'formtype' => 'SELECT',
136153
'default' => 'www',
@@ -140,31 +157,22 @@
140157
'errmsg'=> 'domain_error_autosub'),
141158
),
142159
'value' => array('none' => 'none_txt', 'www' => 'www.', '*' => '*.')
143-
),
144-
'seo_redirect' => array (
160+
);
161+
$form["tabs"]['domain']['fields']['seo_redirect'] = array (
145162
'datatype' => 'VARCHAR',
146163
'formtype' => 'SELECT',
147164
'default' => '',
148165
'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld')
149-
),
150-
'active' => array (
151-
'datatype' => 'VARCHAR',
152-
'formtype' => 'CHECKBOX',
153-
'default' => 'y',
154-
'value' => array(0 => 'n', 1 => 'y')
155-
),
156-
//#################################
157-
// ENDE Datatable fields
158-
//#################################
159-
)
160-
);
166+
);
167+
168+
}
161169

162170
if($_SESSION["s"]["user"]["typ"] == 'admin') {
163171

164172
$form["tabs"]['advanced'] = array (
165173
'title' => "Options",
166174
'width' => 100,
167-
'template' => "templates/web_aliasdomain_advanced.htm",
175+
'template' => "templates/web_childdomain_advanced.htm",
168176
'readonly' => false,
169177
'fields' => array (
170178
//#################################

interface/web/sites/form/web_subdomain.tform.php

Lines changed: 0 additions & 174 deletions
This file was deleted.

interface/web/sites/lib/lang/es_web_aliasdomain.lng renamed to interface/web/sites/lib/lang/ar_web_childdomain.lng

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
<?php
2-
$wb['domain_txt'] = 'Aliasdomain';
3-
$wb['backup_interval_txt'] = 'Backup interval';
4-
$wb['backup_copies_txt'] = 'Number of backup copies';
52
$wb['ssl_state_txt'] = 'State';
63
$wb['ssl_locality_txt'] = 'Locality';
74
$wb['ssl_organisation_txt'] = 'Organisation';
85
$wb['ssl_organisation_unit_txt'] = 'Organisation Unit';
96
$wb['ssl_country_txt'] = 'Country';
10-
$wb['ssl_key_txt'] = 'SSL Key';
117
$wb['ssl_request_txt'] = 'SSL Request';
128
$wb['ssl_cert_txt'] = 'SSL Certificate';
139
$wb['ssl_bundle_txt'] = 'SSL Bundle';
1410
$wb['ssl_action_txt'] = 'SSL Action';
15-
$wb['ssl_domain_txt'] = 'SSL Domain';
1611
$wb['server_id_txt'] = 'Server';
17-
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
12+
$wb['domain_txt'] = 'Domain';
1813
$wb['type_txt'] = 'Type';
1914
$wb['parent_domain_id_txt'] = 'Parent Website';
2015
$wb['redirect_type_txt'] = 'Redirect Type';
@@ -23,26 +18,39 @@ $wb['active_txt'] = 'Active';
2318
$wb['document_root_txt'] = 'Documentroot';
2419
$wb['system_user_txt'] = 'Linux User';
2520
$wb['system_group_txt'] = 'Linux Group';
26-
$wb['ip_address_txt'] = 'IPv4-Address';
27-
$wb['ipv6_address_txt'] = 'IPv6-Address';
21+
$wb['ip_address_txt'] = 'IP-Address';
2822
$wb['vhost_type_txt'] = 'VHost Type';
2923
$wb['hd_quota_txt'] = 'Harddisk Quota';
30-
$wb['traffic_quota_txt'] = 'Traffic Quota';
24+
$wb['traffic_quota_txt'] = 'Traffic Quaota';
3125
$wb['cgi_txt'] = 'CGI';
3226
$wb['ssi_txt'] = 'SSI';
33-
$wb['errordocs_txt'] = 'Own Error-Documents';
34-
$wb['subdomain_txt'] = 'Auto-Subdomain';
3527
$wb['ssl_txt'] = 'SSL';
3628
$wb['suexec_txt'] = 'SuEXEC';
3729
$wb['php_txt'] = 'PHP';
3830
$wb['client_txt'] = 'Client';
3931
$wb['limit_web_domain_txt'] = 'The max. number of web domains for your account is reached.';
4032
$wb['limit_web_aliasdomain_txt'] = 'The max. number of aliasdomains for your account is reached.';
4133
$wb['limit_web_subdomain_txt'] = 'The max. number of web subdomains for your account is reached.';
42-
$wb['apache_directives_txt'] = 'Apache Directives';
34+
$wb['apache_directives_txt'] = 'Apache directives';
4335
$wb['domain_error_empty'] = 'Domain is empty.';
4436
$wb['domain_error_unique'] = 'There is already a website or sub / aliasdomain with this domain name.';
4537
$wb['domain_error_regex'] = 'Domain name invalid.';
38+
$wb['host_txt'] = 'Host';
39+
$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
40+
$wb['no_redirect_txt'] = 'No redirect';
41+
$wb['no_flag_txt'] = 'No flag';
42+
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
43+
$wb['proxy_directives_txt'] = 'Proxy Directives';
44+
$wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
45+
$wb['error_proxy_requires_url'] = 'Redirect Type \"proxy\" requires a URL as the redirect path.';
46+
$wb['backup_interval_txt'] = 'Backup interval';
47+
$wb['backup_copies_txt'] = 'Number of backup copies';
48+
$wb['ssl_key_txt'] = 'SSL Key';
49+
$wb['ssl_domain_txt'] = 'SSL Domain';
50+
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
51+
$wb['ipv6_address_txt'] = 'IPv6-Address';
52+
$wb['errordocs_txt'] = 'Own Error-Documents';
53+
$wb['subdomain_txt'] = 'Auto-Subdomain';
4654
$wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
4755
$wb['hd_quota_error_empty'] = 'Harddisk quota is 0 or empty.';
4856
$wb['traffic_quota_error_empty'] = 'Traffic quota is empty.';
@@ -62,7 +70,6 @@ $wb['ssl_organisation_error_regex'] = 'Invalid SSL Organisation. Valid character
6270
$wb['ssl_organistaion_unit_error_regex'] = 'Invalid SSL Organisation Unit. Valid characters are: a-z, 0-9 and .,-_';
6371
$wb['ssl_country_error_regex'] = 'Invalid SSL Country. Valid characters are: A-Z';
6472
$wb['limit_traffic_quota_free_txt'] = 'Max. available Traffic Quota';
65-
$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
6673
$wb['php_open_basedir_txt'] = 'PHP open_basedir';
6774
$wb['traffic_quota_exceeded_txt'] = 'Traffic quota exceeded';
6875
$wb['ruby_txt'] = 'Ruby';
@@ -71,8 +78,6 @@ $wb['stats_type_txt'] = 'Webstatistics program';
7178
$wb['custom_php_ini_txt'] = 'Custom php.ini settings';
7279
$wb['none_txt'] = 'None';
7380
$wb['disabled_txt'] = 'Disabled';
74-
$wb['no_redirect_txt'] = 'No redirect';
75-
$wb['no_flag_txt'] = 'No flag';
7681
$wb['save_certificate_txt'] = 'Save certificate';
7782
$wb['create_certificate_txt'] = 'Create certificate';
7883
$wb['delete_certificate_txt'] = 'Delete certificate';
@@ -109,7 +114,6 @@ $wb['password_match_txt'] = 'The passwords do match.';
109114
$wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';
110115
$wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:';
111116
$wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:';
112-
$wb['proxy_directives_txt'] = 'Proxy Directives';
113-
$wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
114117
$wb['Domain'] = 'Aliasdomain';
118+
115119
?>

0 commit comments

Comments
 (0)