Make block count on stats page configurable

Fixes #549
This commit is contained in:
Sebastian Grewe 2013-08-05 09:18:52 +02:00
parent 0c35a046e0
commit d59b8ef563
2 changed files with 4 additions and 1 deletions

View File

@ -109,6 +109,7 @@ $config['ap_threshold']['max'] = 250;
* mobile : Enable/Disable mobile theme support * mobile : Enable/Disable mobile theme support
* mobile_theme : Theme used for mobile browsers * mobile_theme : Theme used for mobile browsers
* api disabled : Disable the sites API functions * api disabled : Disable the sites API functions
* blocks count : # of blocks to display on block statistics page
* *
* Defaults: * Defaults:
* title = `The Pool - Mining Evolved` * title = `The Pool - Mining Evolved`
@ -119,6 +120,7 @@ $config['ap_threshold']['max'] = 250;
* mobile = true * mobile = true
* mobile_theme = `mobile` * mobile_theme = `mobile`
* api disbabled = false * api disbabled = false
* blocks count = 20
**/ **/
$config['website']['title'] = 'The Pool - Mining Evolved'; $config['website']['title'] = 'The Pool - Mining Evolved';
$config['website']['name'] = 'The Pool'; $config['website']['name'] = 'The Pool';
@ -128,6 +130,7 @@ $config['website']['theme'] = 'mmcFE';
$config['website']['mobile'] = true; $config['website']['mobile'] = true;
$config['website']['mobile_theme'] = 'mobile'; $config['website']['mobile_theme'] = 'mobile';
$config['website']['api']['disabled'] = false; $config['website']['api']['disabled'] = false;
$config['website']['blocks']['count'] = 20;
/** /**
* Account specific settings * Account specific settings

View File

@ -7,7 +7,7 @@ if (!defined('SECURITY')) die('Hacking attempt');
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$debug->append('No cached version available, fetching from backend', 3); $debug->append('No cached version available, fetching from backend', 3);
// Grab the last blocks found // Grab the last blocks found
$iLimit = 20; !empty($config['website']['blocks']['count']) ? $iLimit = $config['website']['blocks']['count'] : $iLimit = 20;
$aBlocksFoundData = $statistics->getBlocksFound($iLimit); $aBlocksFoundData = $statistics->getBlocksFound($iLimit);
// Propagate content our template // Propagate content our template