Merge pull request #334 from TheSerapher/issue-327

Potential fix for PHP Warning
This commit is contained in:
Sebastian Grewe 2013-07-02 02:00:15 -07:00
commit f3caa80d80
2 changed files with 4 additions and 2 deletions

View File

@ -18,9 +18,11 @@ if (@$_SESSION['AUTHENTICATED']) {
$dDifficulty = $bitcoin->query('getdifficulty');
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
$dDifficulty = $dDifficulty['proof-of-work'];
$dNetworkHashrate = $bitcoin->query('getnetworkhashps');
}
}
// Always fetch this since we need for ministats header
if ($bitcoin->can_connect() === true)
$dNetworkHashrate = $bitcoin->query('getnetworkhashps');
// Fetch some data
$iCurrentActiveWorkers = $worker->getCountAllActiveWorkers();

View File

@ -5,7 +5,7 @@
<table border="0">
<tr>
{if $GLOBAL.config.price.currency}<td><li>{$GLOBAL.config.currency}/{$GLOBAL.config.price.currency}: {$GLOBAL.price|default:"n/a"|number_format:"4"}&nbsp;&nbsp;&nbsp;&nbsp;</li></td>{/if}
<td><li>Network Hashrate: {($GLOBAL.nethashrate / 1000 / 1000 / 1000)|number_format:"3"} GH/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Network Hashrate: {($GLOBAL.nethashrate / 1000 / 1000 / 1000)|default:"0"|number_format:"3"} GH/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Pool Hashrate: {($GLOBAL.hashrate / 1000)|number_format:"3"} MH/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Pool Sharerate: {$GLOBAL.sharerate|number_format:"2"} Shares/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Pool Workers: {$GLOBAL.workers}&nbsp;&nbsp;&nbsp;&nbsp;</li></td>