You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/lib/classes/quota_lib.inc.php
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,12 @@ public function get_quota_data($clientid = null, $readable = true) {
14
14
//print_r($monitor_data);
15
15
16
16
// select all websites or websites belonging to client
17
-
$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":'') . " ORDER BY domain", $clientid);
17
+
$q = " SELECT * FROM web_domain
18
+
WHERE active = 'y' AND type = 'vhost'"
19
+
. 'AND sys_groupid ' . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)"
20
+
: " IN (" . $_SESSION["s"]["user"]["groups"] . ")")
@@ -209,7 +214,11 @@ public function get_mailquota_data($clientid = null, $readable = true) {
209
214
//print_r($monitor_data);
210
215
211
216
// select all email accounts or email accounts belonging to client
212
-
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY email", $clientid);
217
+
$q = " SELECT * FROM mail_user"
218
+
. " WHERE sys_groupid " . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)"
219
+
: " IN (" . $_SESSION["s"]["user"]["groups"] . ")")
@@ -265,7 +274,11 @@ public function get_databasequota_data($clientid = null, $readable = true) {
265
274
//print_r($monitor_data);
266
275
267
276
// select all databases belonging to client
268
-
$databases = $app->db->queryAllRecords("SELECT * FROM web_database".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY database_name", $clientid);
277
+
$q = "SELECT * FROM web_database"
278
+
. " WHERE sys_groupid " . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)"
279
+
: " IN (" . $_SESSION["s"]["user"]["groups"] . ")")
0 commit comments