Skip to content

Commit 3764dc4

Browse files
committed
Implemented: FS#539 - ssl domain must be selectable
1 parent 33d95b8 commit 3764dc4

File tree

6 files changed

+135
-106
lines changed

6 files changed

+135
-106
lines changed

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ CREATE TABLE `web_domain` (
10221022
`ssl_organisation` varchar(255) NULL,
10231023
`ssl_organisation_unit` varchar(255) NULL,
10241024
`ssl_country` varchar(255) NULL,
1025+
`ssl_domain` varchar(255) NULL,
10251026
`ssl_request` mediumtext NULL,
10261027
`ssl_cert` mediumtext NULL,
10271028
`ssl_bundle` mediumtext NULL,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@
286286
'width' => '2',
287287
'maxlength' => '2'
288288
),
289+
'ssl_domain' => array (
290+
'datatype' => 'VARCHAR',
291+
'formtype' => 'TEXT',
292+
'default' => '',
293+
'value' => '',
294+
'width' => '30',
295+
'maxlength' => '255'
296+
),
289297
'ssl_request' => array (
290298
'datatype' => 'TEXT',
291299
'formtype' => 'TEXTAREA',
Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,50 @@
1-
<?php
2-
$wb["ssl_state_txt"] = 'State';
3-
$wb["ssl_locality_txt"] = 'Locality';
4-
$wb["ssl_organisation_txt"] = 'Organisation';
5-
$wb["ssl_organisation_unit_txt"] = 'Organisation Unit';
6-
$wb["ssl_country_txt"] = 'Country';
7-
$wb["ssl_request_txt"] = 'SSL Request';
8-
$wb["ssl_cert_txt"] = 'SSL Certificate';
9-
$wb["ssl_bundle_txt"] = 'SSL Bundle';
10-
$wb["ssl_action_txt"] = 'SSL Action';
11-
$wb["server_id_txt"] = 'Server';
12-
$wb["domain_txt"] = 'Domain';
13-
$wb["type_txt"] = 'Type';
14-
$wb["parent_domain_id_txt"] = 'Parent Website';
15-
$wb["redirect_type_txt"] = 'Redirect Type';
16-
$wb["redirect_path_txt"] = 'Redirect Path';
17-
$wb["active_txt"] = 'Active';
18-
$wb["document_root_txt"] = 'Documentroot';
19-
$wb["system_user_txt"] = 'Linux User';
20-
$wb["system_group_txt"] = 'Linux Group';
21-
$wb["ip_address_txt"] = 'IP-Address';
22-
$wb["vhost_type_txt"] = 'VHost Type';
23-
$wb["hd_quota_txt"] = 'Harddisk Quota';
24-
$wb["traffic_quota_txt"] = 'Traffic Quota';
25-
$wb["cgi_txt"] = 'CGI';
26-
$wb["ssi_txt"] = 'SSI';
27-
$wb["errordocs_txt"] = 'Own Error-Documents';
28-
$wb["subdomain_txt"] = 'Auto-Subdomain';
29-
$wb["ssl_txt"] = 'SSL';
30-
$wb["suexec_txt"] = 'SuEXEC';
31-
$wb["php_txt"] = 'PHP';
32-
$wb["client_txt"] = 'Client';
33-
$wb["limit_web_domain_txt"] = 'The max. number of web domains for your account is reached.';
34-
$wb["limit_web_aliasdomain_txt"] = 'The max. number of aliasdomains for your account is reached.';
35-
$wb["limit_web_subdomain_txt"] = 'The max. number of web subdomains for your account is reached.';
36-
$wb["apache_directives_txt"] = 'Apache directives';
37-
$wb["domain_error_empty"] = 'Domain is empty.';
38-
$wb["domain_error_unique"] = 'There is already a website or sub / aliasdomain with this domain name.';
39-
$wb["domain_error_regex"] = 'Domain name invalid.';
40-
$wb["hd_quota_error_empty"] = 'Harddisk quota is empty.';
41-
$wb["traffic_quota_error_empty"] = 'Traffic quota is empty.';
42-
$wb['error_ssl_state_empty'] = 'SSL State is empty.';
43-
$wb['error_ssl_locality_empty'] = 'SSL Locality is empty.';
44-
$wb['error_ssl_organisation_empty'] = 'SSL Organisation is empty.';
45-
$wb['error_ssl_organisation_unit_empty'] = 'SSL Organisation Unit is empty.';
46-
$wb['error_ssl_country_empty'] = 'SSL Country is empty.';
47-
$wb["client_group_id_txt"] = 'Client';
48-
$wb["stats_password_txt"] = 'Webstatistics password';
49-
?>
1+
<?php
2+
$wb["ssl_state_txt"] = 'State';
3+
$wb["ssl_locality_txt"] = 'Locality';
4+
$wb["ssl_organisation_txt"] = 'Organisation';
5+
$wb["ssl_organisation_unit_txt"] = 'Organisation Unit';
6+
$wb["ssl_country_txt"] = 'Country';
7+
$wb["ssl_request_txt"] = 'SSL Request';
8+
$wb["ssl_cert_txt"] = 'SSL Certificate';
9+
$wb["ssl_bundle_txt"] = 'SSL Bundle';
10+
$wb["ssl_action_txt"] = 'SSL Action';
11+
$wb["ssl_domain_txt"] = 'SSL Domain';
12+
$wb["server_id_txt"] = 'Server';
13+
$wb["domain_txt"] = 'Domain';
14+
$wb["type_txt"] = 'Type';
15+
$wb["parent_domain_id_txt"] = 'Parent Website';
16+
$wb["redirect_type_txt"] = 'Redirect Type';
17+
$wb["redirect_path_txt"] = 'Redirect Path';
18+
$wb["active_txt"] = 'Active';
19+
$wb["document_root_txt"] = 'Documentroot';
20+
$wb["system_user_txt"] = 'Linux User';
21+
$wb["system_group_txt"] = 'Linux Group';
22+
$wb["ip_address_txt"] = 'IP-Address';
23+
$wb["vhost_type_txt"] = 'VHost Type';
24+
$wb["hd_quota_txt"] = 'Harddisk Quota';
25+
$wb["traffic_quota_txt"] = 'Traffic Quota';
26+
$wb["cgi_txt"] = 'CGI';
27+
$wb["ssi_txt"] = 'SSI';
28+
$wb["errordocs_txt"] = 'Own Error-Documents';
29+
$wb["subdomain_txt"] = 'Auto-Subdomain';
30+
$wb["ssl_txt"] = 'SSL';
31+
$wb["suexec_txt"] = 'SuEXEC';
32+
$wb["php_txt"] = 'PHP';
33+
$wb["client_txt"] = 'Client';
34+
$wb["limit_web_domain_txt"] = 'The max. number of web domains for your account is reached.';
35+
$wb["limit_web_aliasdomain_txt"] = 'The max. number of aliasdomains for your account is reached.';
36+
$wb["limit_web_subdomain_txt"] = 'The max. number of web subdomains for your account is reached.';
37+
$wb["apache_directives_txt"] = 'Apache directives';
38+
$wb["domain_error_empty"] = 'Domain is empty.';
39+
$wb["domain_error_unique"] = 'There is already a website or sub / aliasdomain with this domain name.';
40+
$wb["domain_error_regex"] = 'Domain name invalid.';
41+
$wb["hd_quota_error_empty"] = 'Harddisk quota is empty.';
42+
$wb["traffic_quota_error_empty"] = 'Traffic quota is empty.';
43+
$wb['error_ssl_state_empty'] = 'SSL State is empty.';
44+
$wb['error_ssl_locality_empty'] = 'SSL Locality is empty.';
45+
$wb['error_ssl_organisation_empty'] = 'SSL Organisation is empty.';
46+
$wb['error_ssl_organisation_unit_empty'] = 'SSL Organisation Unit is empty.';
47+
$wb['error_ssl_country_empty'] = 'SSL Country is empty.';
48+
$wb["client_group_id_txt"] = 'Client';
49+
$wb["stats_password_txt"] = 'Webstatistics password';
50+
?>
Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,62 @@
1-
<h2><tmpl_var name="list_head_txt"></h2>
2-
<p><tmpl_var name="list_desc_txt"></p>
3-
4-
<div class="panel panel_web_domain">
5-
6-
<div class="pnl_formsarea">
7-
<fieldset class="inlineLabels">
8-
<div class="ctrlHolder">
9-
<label for="ssl_state">{tmpl_var name='ssl_state_txt'}</label>
10-
<input name="ssl_state" id="ssl_state" value="{tmpl_var name='ssl_state'}" size="30" maxlength="255" type="text" class="textInput" />
11-
</div>
12-
<div class="ctrlHolder">
13-
<label for="ssl_locality">{tmpl_var name='ssl_locality_txt'}</label>
14-
<input name="ssl_locality" id="ssl_locality" value="{tmpl_var name='ssl_locality'}" size="30" maxlength="255" type="text" class="textInput" />
15-
</div>
16-
<div class="ctrlHolder">
17-
<label for="ssl_organisation">{tmpl_var name='ssl_organisation_txt'}</label>
18-
<input name="ssl_organisation" id="ssl_organisation" value="{tmpl_var name='ssl_organisation'}" size="30" maxlength="255" type="text" class="textInput" />
19-
</div>
20-
<div class="ctrlHolder">
21-
<label for="ssl_organisation_unit">{tmpl_var name='ssl_organisation_unit_txt'}</label>
22-
<input name="ssl_organisation_unit" id="ssl_organisation_unit" value="{tmpl_var name='ssl_organisation_unit'}" size="30" maxlength="255" type="text" class="textInput" />
23-
</div>
24-
<div class="ctrlHolder">
25-
<label for="ssl_country">{tmpl_var name='ssl_country_txt'}</label>
26-
<input name="ssl_country" id="ssl_country" value="{tmpl_var name='ssl_country'}" size="2" maxlength="2" type="text" class="textInput" />
27-
</div>
28-
<div class="ctrlHolder">
29-
<label for="ssl_request">{tmpl_var name='ssl_request_txt'}</label>
30-
<textarea name="ssl_request" id="ssl_request" rows='10' cols='30'>{tmpl_var name='ssl_request'}</textarea>
31-
</div>
32-
<div class="ctrlHolder">
33-
<label for="ssl_cert">{tmpl_var name='ssl_cert_txt'}</label>
34-
<textarea name="ssl_cert" id="ssl_cert" rows='10' cols='30'>{tmpl_var name='ssl_cert'}</textarea>
35-
</div>
36-
<div class="ctrlHolder">
37-
<label for="ssl_bundle">{tmpl_var name='ssl_bundle_txt'}</label>
38-
<textarea name="ssl_bundle" id="ssl_bundle" rows='10' cols='30'>{tmpl_var name='ssl_bundle'}</textarea>
39-
</div>
40-
<div class="ctrlHolder">
41-
<label for="ssl_action">{tmpl_var name='ssl_action_txt'}</label>
42-
<select name="ssl_action" id="ssl_action" class="selectInput formLengthHalf">
43-
{tmpl_var name='ssl_action'}
44-
</select>
45-
</div>
46-
</fieldset>
47-
48-
<input type="hidden" name="id" value="{tmpl_var name='id'}">
49-
50-
<div class="buttonHolder buttons">
51-
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
52-
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
53-
</div>
54-
</div>
55-
56-
</div>
1+
<h2><tmpl_var name="list_head_txt"></h2>
2+
<p><tmpl_var name="list_desc_txt"></p>
3+
4+
<div class="panel panel_web_domain">
5+
6+
<div class="pnl_formsarea">
7+
<fieldset class="inlineLabels">
8+
<div class="ctrlHolder">
9+
<label for="ssl_state">{tmpl_var name='ssl_state_txt'}</label>
10+
<input name="ssl_state" id="ssl_state" value="{tmpl_var name='ssl_state'}" size="30" maxlength="255" type="text" class="textInput" />
11+
</div>
12+
<div class="ctrlHolder">
13+
<label for="ssl_locality">{tmpl_var name='ssl_locality_txt'}</label>
14+
<input name="ssl_locality" id="ssl_locality" value="{tmpl_var name='ssl_locality'}" size="30" maxlength="255" type="text" class="textInput" />
15+
</div>
16+
<div class="ctrlHolder">
17+
<label for="ssl_organisation">{tmpl_var name='ssl_organisation_txt'}</label>
18+
<input name="ssl_organisation" id="ssl_organisation" value="{tmpl_var name='ssl_organisation'}" size="30" maxlength="255" type="text" class="textInput" />
19+
</div>
20+
<div class="ctrlHolder">
21+
<label for="ssl_organisation_unit">{tmpl_var name='ssl_organisation_unit_txt'}</label>
22+
<input name="ssl_organisation_unit" id="ssl_organisation_unit" value="{tmpl_var name='ssl_organisation_unit'}" size="30" maxlength="255" type="text" class="textInput" />
23+
</div>
24+
<div class="ctrlHolder">
25+
<label for="ssl_country">{tmpl_var name='ssl_country_txt'}</label>
26+
<input name="ssl_country" id="ssl_country" value="{tmpl_var name='ssl_country'}" size="2" maxlength="2" type="text" class="textInput" />
27+
</div>
28+
<div class="ctrlHolder">
29+
<label for="client_group_id">{tmpl_var name='ssl_domain_txt'}</label>
30+
<select name="ssl_domain" id="ssl_domain" class="selectInput">
31+
{tmpl_var name='ssl_domain'}
32+
</select>
33+
</div>
34+
<div class="ctrlHolder">
35+
<label for="ssl_request">{tmpl_var name='ssl_request_txt'}</label>
36+
<textarea name="ssl_request" id="ssl_request" rows='10' cols='30'>{tmpl_var name='ssl_request'}</textarea>
37+
</div>
38+
<div class="ctrlHolder">
39+
<label for="ssl_cert">{tmpl_var name='ssl_cert_txt'}</label>
40+
<textarea name="ssl_cert" id="ssl_cert" rows='10' cols='30'>{tmpl_var name='ssl_cert'}</textarea>
41+
</div>
42+
<div class="ctrlHolder">
43+
<label for="ssl_bundle">{tmpl_var name='ssl_bundle_txt'}</label>
44+
<textarea name="ssl_bundle" id="ssl_bundle" rows='10' cols='30'>{tmpl_var name='ssl_bundle'}</textarea>
45+
</div>
46+
<div class="ctrlHolder">
47+
<label for="ssl_action">{tmpl_var name='ssl_action_txt'}</label>
48+
<select name="ssl_action" id="ssl_action" class="selectInput formLengthHalf">
49+
{tmpl_var name='ssl_action'}
50+
</select>
51+
</div>
52+
</fieldset>
53+
54+
<input type="hidden" name="id" value="{tmpl_var name='id'}">
55+
56+
<div class="buttonHolder buttons">
57+
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
58+
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
59+
</div>
60+
</div>
61+
62+
</div>

interface/web/sites/web_domain_edit.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,19 @@ function onShowEnd() {
179179

180180
}
181181

182+
$ssl_domain_select = '';
183+
$ssl_domains = array($this->dataRecord["domain"],'www.'.$this->dataRecord["domain"]);
184+
if(is_array($ssl_domains)) {
185+
foreach( $ssl_domains as $ssl_domain) {
186+
$selected = ($ssl_domain == $this->dataRecord['ssl_domain'])?'SELECTED':'';
187+
$ssl_domain_select .= "<option value='$ssl_domain' $selected>$ssl_domain</option>\r\n";
188+
}
189+
}
190+
$app->tpl->setVar("ssl_domain",$ssl_domain_select);
191+
unset($ssl_domain_select);
192+
unset($ssl_domains);
193+
unset($ssl_domain);
194+
182195
if($this->id > 0) {
183196
//* we are editing a existing record
184197
$app->tpl->setVar("edit_disabled", 1);

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function ssl($event_name,$data) {
8383

8484
if(!is_dir($data["new"]["document_root"]."/ssl")) exec("mkdir -p ".$data["new"]["document_root"]."/ssl");
8585
$ssl_dir = $data["new"]["document_root"]."/ssl";
86-
$domain = $data["new"]["domain"];
86+
$domain = $data["new"]["ssl_domain"];
8787
$key_file = $ssl_dir.'/'.$domain.".key.org";
8888
$key_file2 = $ssl_dir.'/'.$domain.".key";
8989
$csr_file = $ssl_dir.'/'.$domain.".csr";

0 commit comments

Comments
 (0)