From 1ec41d0f7721e1221c6e98cee9b1a8a2d9db2740 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 23 Dec 2013 20:46:10 +0100 Subject: [PATCH] when adding subdomains as customer, respect the wwwserveralias and iswildcarddomain setting of the parent domain, also when editing a subdomain as customer, pre-set the values that were entered before Signed-off-by: Michael Kaufmann (d00p) --- customer_domains.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/customer_domains.php b/customer_domains.php index 011fc432..627fa794 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -318,7 +318,9 @@ if ($page == 'overview') { `documentroot` = :documentroot, `aliasdomain` = :aliasdomain, `parentdomainid` = :parentdomainid, + `wwwserveralias` = :wwwserveralias, `isemaildomain` = :isemaildomain, + `iswildcarddomain` = :iswildcarddomain, `openbasedir` = :openbasedir, `openbasedir_path` = :openbasedir_path, `speciallogfile` = :speciallogfile, @@ -332,6 +334,8 @@ if ($page == 'overview') { "documentroot" => $path, "aliasdomain" => $aliasdomain != 0 ? $aliasdomain : null, "parentdomainid" => $domain_check['id'], + "wwwserveralias" => $domain_check['wwwserveralias'] == '1' ? '1' : '0', + "iswildcarddomain" => $domain_check['iswildcarddomain'] == '1' ? '1' : '0', "isemaildomain" => $domain_check['subcanemaildomain'] == '3' ? '1' : '0', "openbasedir" => $domain_check['openbasedir'], "openbasedir_path" => $openbasedir_path, @@ -478,8 +482,8 @@ if ($page == 'overview') { $iswildcarddomain = ($_POST['selectserveralias'] == '0') ? '1' : '0'; $wwwserveralias = ($_POST['selectserveralias'] == '1') ? '1' : '0'; } else { - $iswildcarddomain = '0'; - $wwwserveralias = '0'; + $iswildcarddomain = $result['iswildcarddomain']; + $wwwserveralias = $result['wwwserveralias']; } if ($result['parentdomainid'] != '0' && ($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && isset($_POST['isemaildomain'])) {