1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 17:39:46 +01:00

Bugtracker #4925 - missed a file

This commit is contained in:
e107steved 2010-03-17 22:45:14 +00:00
parent 1de2a0f622
commit 6f5065c093

View File

@ -1970,6 +1970,7 @@ class siteStats
{
$sql = e107::getDB();
// Month format entries have log_id = yyyy-mm
if(!$entries = $sql -> db_Select("logstats", "*", "log_id REGEXP('^[[:digit:]]+\-[[:digit:]]+$') ORDER BY CONCAT(LEFT(log_id,4), RIGHT(log_id,2)) DESC"))
{
return ADSTAT_L42;
@ -1978,7 +1979,7 @@ class siteStats
$text = '';
$array = $sql -> db_getList();
$monthTotal = array();
$monthTotal = array(); // Array of totals, one per month, with 'totalv', 'uniquev' sub-indices
$mtotal = 0;
$utotal = 0;
foreach($array as $info)
@ -1986,6 +1987,8 @@ class siteStats
$date = $info['log_id'];
$stats = unserialize($info['log_data']);
/*
Used to have to calculate monthly stats by adding the individual page access fields
foreach($stats as $key => $total)
{
if (!isset($monthTotal[$date]['totalv'])) $monthTotal[$date]['totalv'] = 0;
@ -1995,6 +1998,12 @@ class siteStats
$mtotal += $total['ttlv'];
$utotal += $total['unqv'];
}
*/
// Now we store a total, so just use that
$monthTotal[$date]['totalv'] = varset($stats['TOTAL']['ttlv'], 0);
$monthTotal[$date]['uniquev'] = varset($stats['TOTAL']['unqv'], 0);
$mtotal += $monthTotal[$date]['totalv'];
$utotal += $monthTotal[$date]['uniquev'];
}
$tmpArray = $this -> arraySort($monthTotal, "totalv");