Skip to content

Commit d96e29e

Browse files
author
Marius Cramer
committed
- added alias- and subdomains to ssl domain select
1 parent 90b13a1 commit d96e29e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

interface/web/sites/web_domain_edit.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,15 @@ function onShowEnd() {
406406
}
407407

408408
$ssl_domain_select = '';
409-
$tmp = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ".$this->id);
410-
$ssl_domains = array($tmp["domain"], 'www.'.$tmp["domain"], '*.'.$tmp["domain"]);
409+
$ssl_domains = array();
410+
$tmpd = $app->db->queryAllRecords("SELECT domain, type FROM web_domain WHERE domain_id = ".$this->id." OR parent_domain_id = ".$this->id);
411+
foreach($tmpd as $tmp) {
412+
if($tmp['type'] == 'subdomain' || $tmp['type'] == 'vhostsubdomain']) {
413+
$ssl_domains[] = $tmp["domain"];
414+
} else {
415+
$ssl_domains = array_merge($ssl_domains, array($tmp["domain"],'www.'.$tmp["domain"],'*.'.$tmp["domain"]));
416+
}
417+
}
411418
if(is_array($ssl_domains)) {
412419
foreach( $ssl_domains as $ssl_domain) {
413420
$selected = ($ssl_domain == $this->dataRecord['ssl_domain'])?'SELECTED':'';

0 commit comments

Comments
 (0)