From 8edfb88ee35399229e4b9afbdcf1b3439822a541 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 8 Nov 2013 10:41:40 +0100 Subject: [PATCH] [FIX] Use default cointarget if unset --- public/include/pages/statistics/blocks.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/include/pages/statistics/blocks.inc.php b/public/include/pages/statistics/blocks.inc.php index cf812792..12f034c0 100644 --- a/public/include/pages/statistics/blocks.inc.php +++ b/public/include/pages/statistics/blocks.inc.php @@ -73,12 +73,14 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $aPoolStatistics = $statistics->getPoolStatsHours($iHours); $iFirstBlockFound = $statistics->getFirstBlockFound(); $iTimeSinceFirstBlockFound = (time() - $iFirstBlockFound); - + + // Coin target block generation time, default to 150 (2.5 minutes) + @$config['cointarget'] ? $smarty->assign("COINGENTIME", $config['cointarget']) : $smarty->assign("COINGENTIME", 150); + // Past blocks found, max 4 weeks back $iFoundBlocksByTime = $statistics->getLastBlocksbyTime(); // Propagate content our template $smarty->assign("FIRSTBLOCKFOUND", $iTimeSinceFirstBlockFound); - $smarty->assign("COINGENTIME", $config['cointarget']); $smarty->assign("LASTBLOCKSBYTIME", $iFoundBlocksByTime); $smarty->assign("BLOCKSFOUND", $aBlocksFoundData); $smarty->assign("BLOCKLIMIT", $iLimit);