You are here

function boost_stats_output_stats_block in Boost 6

Same name in this branch
  1. 6 stats/boost_stats.ajax.inc \boost_stats_output_stats_block()
  2. 6 stats/boost_stats.php \boost_stats_output_stats_block()
2 calls to boost_stats_output_stats_block()
boost_stats.php in stats/boost_stats.php
Place in webroot, for faster stats if needed.
boost_stats_ajax_callback in stats/boost_stats.ajax.inc
AJAX Menu Callback.

File

stats/boost_stats.php, line 148
Place in webroot, for faster stats if needed.

Code

function boost_stats_output_stats_block() {
  if (boost_stats_variable_get('boost_block_show_stats')) {
    if (!boost_stats_variable_get('boost_block_cache_stats_block') && !boost_stats_variable_get('throttle_level')) {
      boost_stats_full_boot();
      $block = module_invoke('statistics', 'block', 'view', 0);
      $block = $block['content'];
    }
    else {
      $block = boost_stats_variable_get('boost_statistics_html');
    }
  }
  else {
    $block = 'NULL';
  }
  return array(
    '#boost-stats' => $block,
  );
}