Skip to content

Commit e6e3350

Browse files
committed
Fixed "Infinity" and "NaN" at web domain disk/bandwidth graph
1 parent af3ee14 commit e6e3350

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/vesta/api/MAIN.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ public function getInitialExecute(Request $request)
212212
$cron['SUSPEND'] == 'yes' ? $totals['CRON']['blocked'] += 1 : false;
213213
}
214214

215-
$rs1 = Vesta::execute(Vesta::V_GET_SYS_USER_VALUE, array('USER' => $this->getLoggedUser(), 'KEY' => 'BANDWIDTH'));
215+
$rs1 = Vesta::execute(Vesta::V_GET_SYS_USER_VALUE, array('USER' => $user['uid'], 'KEY' => 'BANDWIDTH'));
216216
$bandwidth = $rs1['data'];
217-
$rs = Vesta::execute(Vesta::V_GET_SYS_USER_VALUE, array('USER' => $this->getLoggedUser(), 'KEY' => 'DISK_QUOTA'));
217+
$rs = Vesta::execute(Vesta::V_GET_SYS_USER_VALUE, array('USER' => $user['uid'], 'KEY' => 'DISK_QUOTA'));
218218
$disk_quota = $rs['data'];
219219

220220
$reply = array(
221221
'auth_user' => array('uid' => $this->getLoggedUser()),
222-
'user_data' => array('BANDWIDTH' => json_encode($rs1)/*(int)$bandwidth*/, 'DISK_QUOTA' => (int)$disk_quota),
222+
'user_data' => array('BANDWIDTH' => (int)$bandwidth, 'DISK_QUOTA' => (int)$disk_quota),
223223
'WEB_DOMAIN' => $this->getWebDomainParams($data_web_domain, $global_data),
224224
'CRON' => $this->getCronParams(),
225225
'IP' => $this->getIpParams($data_ip, $global_data),

0 commit comments

Comments
 (0)