From bdcc3f747c7e2317d18b86d5bc40f3c7356d1093 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 4 Jun 2013 09:08:30 +0200 Subject: [PATCH] Addressing #96, missing difficulty on stats page * Properly assign template variable * Removed unneeded additional template --- public/include/pages/statistics.inc.php | 8 +++---- public/include/pages/statistics/pool.inc.php | 2 +- .../mmcFE/statistics/pool/default.tpl | 22 ------------------- 3 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 public/templates/mmcFE/statistics/pool/default.tpl diff --git a/public/include/pages/statistics.inc.php b/public/include/pages/statistics.inc.php index c465f091..195e3545 100644 --- a/public/include/pages/statistics.inc.php +++ b/public/include/pages/statistics.inc.php @@ -5,14 +5,14 @@ if (!defined('SECURITY')) die('Hacking attempt'); if ($bitcoin->can_connect() === true){ - $iDifficulty = $bitcoin->query('getdifficulty'); + $dDifficulty = $bitcoin->query('getdifficulty'); $iBlock = $bitcoin->query('getblockcount'); } else { - $iDifficulty = 1; + $dDifficulty = 1; $iBlock = 0; $_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to litecoind RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg'); } $smarty->assign("CURRENTBLOCK", $iBlock); -$smarty->assign("CURRENTDIFFICULTY", $iDifficulty); -$smarty->assign("CONTENT", "pool/default.tpl"); +$smarty->assign("DIFFICULTY", $dDifficulty); +$smarty->assign("CONTENT", "default.tpl"); diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index 0c9c2eb7..ede0933a 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -53,6 +53,6 @@ $smarty->assign("REWARD", $config['reward']); if ($_SESSION['AUTHENTICATED']) { $smarty->assign("CONTENT", "authenticated.tpl"); } else { - $smarty->assign("CONTENT", "default.tpl"); + $smarty->assign("CONTENT", "../default.tpl"); } ?> diff --git a/public/templates/mmcFE/statistics/pool/default.tpl b/public/templates/mmcFE/statistics/pool/default.tpl deleted file mode 100644 index d1dfd202..00000000 --- a/public/templates/mmcFE/statistics/pool/default.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{include file="global/block_header.tpl" BLOCK_HEADER="Pool Statistics"} - - - - - - - - - - - - - - - - - - - -
Pool Hash Rate{$GLOBAL.hashrate / 1000} Mhash/s
Current Total Miners{$GLOBAL.workers}
Current Block{$CURRENTBLOCK}
Current Difficulty{$DIFFICULTY}
-{include file="global/block_footer.tpl"}