[FIX] 24 Hour Account Graphs
This commit is contained in:
parent
656a92d286
commit
9da7af8a5e
@ -725,6 +725,7 @@ class Statistics extends Base {
|
||||
if ($data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data;
|
||||
$stmt = $this->mysqli->prepare("
|
||||
SELECT
|
||||
id,
|
||||
IFNULL(ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
||||
HOUR(time) AS hour
|
||||
FROM " . $this->share->getTableName() . "
|
||||
|
||||
@ -4,7 +4,7 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$debug->append('No cached version available, fetching from backend', 3);
|
||||
if ($user->isAuthenticated()) {
|
||||
$aHourlyHashRates = $statistics->getHourlyHashrateByAccount($_SESSION['USERDATA']['id']);
|
||||
$aHourlyHashRates = $statistics->getHourlyHashrateByAccount($_SESSION['USERDATA']['username'], $_SESSION['USERDATA']['id']);
|
||||
$aPoolHourlyHashRates = $statistics->getHourlyHashrateByPool();
|
||||
}
|
||||
$smarty->assign("YOURHASHRATES", @$aHourlyHashRates);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user