Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-06-12 08:23:51 +0400
committermattab <matthieu.aubry@gmail.com>2013-06-16 12:11:03 +0400
commitd8f110aca03ff8c73811a141631f12a7a1ddc16f (patch)
tree58ca855357d521bae098e882970a14c83874b742 /plugins/VisitTime
parentc17139710a43b55b5f48377e6281db6ae602957c (diff)
More refactoring, moving SQL to classes and cleaning up logic so I can understand it (nearly there)
Diffstat (limited to 'plugins/VisitTime')
-rw-r--r--plugins/VisitTime/API.php5
-rw-r--r--plugins/VisitTime/Archiver.php4
2 files changed, 5 insertions, 4 deletions
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)
diff --git a/plugins/VisitTime/Archiver.php b/plugins/VisitTime/Archiver.php
index af811e0d2f..2f11c61d2a 100644
--- a/plugins/VisitTime/Archiver.php
+++ b/plugins/VisitTime/Archiver.php
@@ -46,7 +46,7 @@ class Piwik_VisitTime_Archiver extends Piwik_PluginsArchiver
protected function convertTimeToLocalTimezone(Piwik_DataArray &$array)
{
- $date = Piwik_Date::factory($this->getProcessor()->getStartDatetimeUTC())->toString();
+ $date = Piwik_Date::factory($this->getProcessor()->getDateStart()->getDateStartUTC())->toString();
$timezone = $this->getProcessor()->getSite()->getTimezone();
$converted = array();
@@ -75,6 +75,6 @@ class Piwik_VisitTime_Archiver extends Piwik_PluginsArchiver
self::LOCAL_TIME_RECORD_NAME,
self::SERVER_TIME_RECORD_NAME,
);
- $this->getProcessor()->archiveDataTable($dataTableToSum);
+ $this->getProcessor()->aggregateDataTableReports($dataTableToSum);
}
} \ No newline at end of file