|
|
@ -3261,13 +3261,16 @@ function mod_view_statistics() { |
|
|
|
if(!hasPermission($config['mod']['view_statistics'])) |
|
|
|
error($config['error']['noaccess']); |
|
|
|
|
|
|
|
$boards = listBoards(false); |
|
|
|
|
|
|
|
// Get statistics from db |
|
|
|
$statistics_hour = Statistics::get_stat_24h(); |
|
|
|
$this_week = Statistics::get_stat_week(); |
|
|
|
$prev_week = Statistics::get_stat_week(true); |
|
|
|
|
|
|
|
mod_page(_('Statistics'), 'mod/statistics.html', array( |
|
|
|
'boards' => listBoards(false), |
|
|
|
'boards' => $boards, |
|
|
|
'statistics_table' => Statistics::getPostStatistics($boards), |
|
|
|
'statistics_24h' => $statistics_hour, |
|
|
|
'statistics_week_labels' => Statistics::get_stat_week_labels($this_week), |
|
|
|
'statistics_week' => Statistics::get_stat_week_jsdata($this_week), |
|
|
@ -3284,13 +3287,16 @@ function mod_view_board_statistics($boardName) { |
|
|
|
if (!openBoard($boardName)) |
|
|
|
error($config['error']['noboard']); |
|
|
|
|
|
|
|
$boards = listBoards(false); |
|
|
|
|
|
|
|
// Get statistics from db |
|
|
|
$statistics_hour = Statistics::get_stat_24h($boardName); |
|
|
|
$this_week = Statistics::get_stat_week(false, $boardName); |
|
|
|
$prev_week = Statistics::get_stat_week(true, $boardName); |
|
|
|
|
|
|
|
mod_page(_('Statistics for ') . $boardName, 'mod/statistics.html', array( |
|
|
|
'boards' => listBoards(false), |
|
|
|
'boards' => $boards, |
|
|
|
'statistics_table' => Statistics::getPostStatistics($boards), |
|
|
|
'statistics_24h' => $statistics_hour, |
|
|
|
'statistics_week_labels' => Statistics::get_stat_week_labels($this_week), |
|
|
|
'statistics_week' => Statistics::get_stat_week_jsdata($this_week), |
|
|
|