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
+2-12Lines changed: 2 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,7 @@ 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
-
if($clientid != null){
18
-
$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost' AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)", $app->functions->intval($client_id));
19
-
}
20
-
else {
21
-
$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'");
22
-
}
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=?)":''), $app->functions->intval($client_id));
23
18
24
19
//print_r($sites);
25
20
if(is_array($sites) && !empty($sites)){
@@ -114,12 +109,7 @@ public function get_mailquota_data($clientid = null, $readable = true) {
114
109
//print_r($monitor_data);
115
110
116
111
// select all email accounts or email accounts belonging to client
117
-
if($clientid != null){
118
-
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)", $app->functions->intval($client_id));
119
-
}
120
-
else {
121
-
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user");
122
-
}
112
+
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $app->functions->intval($client_id));
0 commit comments