Skip to content

Commit 534a825

Browse files
committed
- Fixed FS#2206, FS#2207, FS#2208.
1 parent c36fe43 commit 534a825

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

interface/web/sites/tools.inc.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ function getClientName($dataRecord) {
6565
} elseif (isset($dataRecord['parent_domain_id'])) {
6666
$tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $dataRecord['parent_domain_id']);
6767
$client_group_id = $tmp['sys_groupid'];
68-
} else {
68+
} elseif(isset($dataRecord['sys_groupid'])) {
6969
$client_group_id = $dataRecord['sys_groupid'];
70-
}
70+
} else {
71+
$client_group_id = 0;
72+
}
7173
}
7274

7375
/* get the name of the client */
74-
$tmp = $app->db->queryOneRecord("SELECT name FROM sys_group WHERE groupid = " . $client_group_id);
76+
$tmp = $app->db->queryOneRecord("SELECT name FROM sys_group WHERE groupid = " . intval($client_group_id));
7577
$clientName = $tmp['name'];
7678
if ($clientName == "") $clientName = 'default';
7779
$clientName = convertClientName($clientName);
@@ -91,9 +93,11 @@ function getClientID($dataRecord) {
9193
} elseif (isset($dataRecord['parent_domain_id'])) {
9294
$tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $dataRecord['parent_domain_id']);
9395
$client_group_id = $tmp['sys_groupid'];
94-
} else {
96+
} elseif(isset($dataRecord['sys_groupid'])) {
9597
$client_group_id = $dataRecord['sys_groupid'];
96-
}
98+
} else {
99+
$client_group_id = 0;
100+
}
97101
}
98102
/* get the name of the client */
99103
$tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = " . intval($client_group_id));

0 commit comments

Comments
 (0)