Skip to content

Commit 3d0cfc3

Browse files
author
mcramer
committed
Bugfix for FS#1993 - Creating Subdomains as VirtualHost
Could not create vhost subdomain as client
1 parent 7b17e45 commit 3d0cfc3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interface/web/sites/web_vhost_subdomain_edit.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function onShowEnd() {
9292

9393
// Get the limits of the client
9494
$client_group_id = $_SESSION["s"]["user"]["default_group"];
95-
$client = $app->db->queryOneRecord("SELECT client.limit_web_domain, client.default_webserver, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
95+
$client = $app->db->queryOneRecord("SELECT client.limit_web_subdomain, client.default_webserver, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
9696

9797
//* Get global web config
9898
$web_config = $app->getconf->get_server_config($parent_domain['server_id'], 'web');
@@ -131,7 +131,7 @@ function onShowEnd() {
131131

132132
// Get the limits of the client
133133
$client_group_id = $_SESSION["s"]["user"]["default_group"];
134-
$client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_domain, client.default_webserver, client.contact_name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
134+
$client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_subdomain, client.default_webserver, client.contact_name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
135135

136136
//* Get global web config
137137
$web_config = $app->getconf->get_server_config($parent_domain['server_id'], 'web');
@@ -267,7 +267,7 @@ function onSubmit() {
267267
if($_SESSION["s"]["user"]["typ"] != 'admin') {
268268
// Get the limits of the client
269269
$client_group_id = $_SESSION["s"]["user"]["default_group"];
270-
$client = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, default_webserver, parent_client_id, limit_web_quota, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
270+
$client = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_subdomain, default_webserver, parent_client_id, limit_web_quota, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
271271

272272
if($client['limit_cgi'] != 'y') $this->dataRecord['cgi'] = '-';
273273
if($client['limit_ssi'] != 'y') $this->dataRecord['ssi'] = '-';
@@ -313,7 +313,7 @@ function onSubmit() {
313313

314314
if($client['parent_client_id'] > 0) {
315315
// Get the limits of the reseller
316-
$reseller = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, default_webserver, limit_web_quota FROM client WHERE client_id = ".$client['parent_client_id']);
316+
$reseller = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_subdomain, default_webserver, limit_web_quota FROM client WHERE client_id = ".$client['parent_client_id']);
317317

318318
//* Check the website quota of the client
319319
if(isset($_POST["hd_quota"]) && $reseller["limit_web_quota"] >= 0) {

0 commit comments

Comments
 (0)