adding pool hashrate, active workers and round shares to smarty globals
This commit is contained in:
parent
170a653f61
commit
b20a2eb657
@ -7,14 +7,32 @@ if (!defined('SECURITY'))
|
||||
// Globally available variables
|
||||
$debug->append('Global smarty variables', 3);
|
||||
|
||||
if (!$iRoundShares = $memcache->get('iRoundShares')) {
|
||||
$debug->append('Fetching iRoundShares from database');
|
||||
$iRoundShares = $share->getRoundShares();
|
||||
$memcache->set('iRoundShares', $iRoundShares, 60);
|
||||
}
|
||||
|
||||
if (!$iCurrentActiveWorkers = $memcache->get('iCurrentActiveWorkers')) {
|
||||
$debug->append('Fetching iCurrentActiveWorkers from database');
|
||||
$iCurrentActiveWorkers = $worker->getCountAllActiveWorkers();
|
||||
$memcache->set('iCurrentActiveWorkers', $iCurrentActiveWorkers, 60);
|
||||
}
|
||||
|
||||
if (!$iCurrentPoolHashrate = $memcache->get('iCurrentPoolHashrate')) {
|
||||
$debug->append('Fetching iCurrentPoolHashrate from database');
|
||||
$iCurrentPoolHashrate = $statistics->getCurrentHashrate();
|
||||
$memcache->set('iCurrentPoolHashrate', $iCurrentPoolHashrate, 60);
|
||||
}
|
||||
|
||||
$aGlobal = array(
|
||||
'userdata' => $_SESSION['USERDATA']['id'] ? $user->getUserData($_SESSION['USERDATA']['id']) : array(),
|
||||
'slogan' => $settings->getValue('slogan'),
|
||||
'websitename' => $settings->getValue('websitename'),
|
||||
'ltc_usd' => $settings->getValue('btcesell'),
|
||||
'hashrate' => $settings->getValue('currenthashrate'),
|
||||
'workers' => $worker->getCountAllActiveWorkers(),
|
||||
'currentroundshares' => $settings->getValue('currentroundshares'),
|
||||
'hashrate' => $iCurrentPoolHashrate,
|
||||
'workers' => $iCurrentActiveWorkers,
|
||||
'currentroundshares' => $iRoundShares,
|
||||
'statstime' => $settings->getValue('statstime'),
|
||||
'motd' => $settings->getValue('motd'),
|
||||
'confirmations' => $config['confirmations']
|
||||
|
||||
Loading…
Reference in New Issue
Block a user