From d8f110aca03ff8c73811a141631f12a7a1ddc16f Mon Sep 17 00:00:00 2001 From: mattab Date: Wed, 12 Jun 2013 16:23:51 +1200 Subject: More refactoring, moving SQL to classes and cleaning up logic so I can understand it (nearly there) --- plugins/VisitTime/API.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/VisitTime/API.php') diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php index 637aa97cbc..65952ba24d 100644 --- a/plugins/VisitTime/API.php +++ b/plugins/VisitTime/API.php @@ -74,14 +74,15 @@ class Piwik_VisitTime_API } // metrics to query - $metrics = Piwik_ArchiveProcessing::getCoreMetrics(); + $metrics = Piwik_Archive::getVisitsMetricNames(); + unset($metrics[Piwik_Archive::INDEX_MAX_ACTIONS]); // get metric data for every day within the supplied period $oPeriod = Piwik_Archive::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date); $dateRange = $oPeriod->getDateStart()->toString() . ',' . $oPeriod->getDateEnd()->toString(); $archive = Piwik_Archive::build($idSite, 'day', $dateRange, $segment); - $dataTable = $archive->getDataTableFromNumeric($metrics)->mergeChildren(); + $dataTable = $archive->getDataTableFromNumeric($metrics); // if there's no data for this report, don't bother w/ anything else // TODO: with changes to getDataTableFromNumeric, this code would have to check if every row has 0 column values. is it really necessary? (assuming no for now) -- cgit v1.2.3