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:
authorBenaka <diosmosis@users.noreply.github.com>2017-09-11 16:08:42 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-09-11 16:08:42 +0300
commitf0ddb70c85a6211540797665f17d36b6d79128a4 (patch)
tree605ef83a15a39b1d30d6641234b83aee58ec8b16 /core/DataAccess/LogAggregator.php
parent1092e4d7290333591f0f9beead6580a1424bc99f (diff)
Changes to support custom periods (#11837)
* Separate Archive query creation responsibility from Archive class. * Add ability for plugins to define custom period types. * Make period responsible for determining start/end time of periods, not LogAggregator. * Allow specifying custom archive writer in PluginsArchiver.
Diffstat (limited to 'core/DataAccess/LogAggregator.php')
-rw-r--r--core/DataAccess/LogAggregator.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php
index 522a46fe95..c30132f41e 100644
--- a/core/DataAccess/LogAggregator.php
+++ b/core/DataAccess/LogAggregator.php
@@ -12,8 +12,10 @@ use Piwik\ArchiveProcessor\Parameters;
use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\DataArray;
+use Piwik\Date;
use Piwik\Db;
use Piwik\Metrics;
+use Piwik\Period;
use Piwik\Tracker\GoalManager;
use Psr\Log\LoggerInterface;
@@ -155,8 +157,8 @@ class LogAggregator
*/
public function __construct(Parameters $params, LoggerInterface $logger = null)
{
- $this->dateStart = $params->getDateStart();
- $this->dateEnd = $params->getDateEnd();
+ $this->dateStart = $params->getDateTimeStart();
+ $this->dateEnd = $params->getDateTimeEnd();
$this->segment = $params->getSegment();
$this->sites = $params->getIdSites();
$this->logger = $logger ?: StaticContainer::get('Psr\Log\LoggerInterface');
@@ -515,7 +517,7 @@ class LogAggregator
*/
protected function getGeneralQueryBindParams()
{
- $bind = array($this->dateStart->getDateStartUTC(), $this->dateEnd->getDateEndUTC());
+ $bind = array($this->dateStart->toString(Date::DATE_TIME_FORMAT), $this->dateEnd->toString(Date::DATE_TIME_FORMAT));
$bind = array_merge($bind, $this->sites);
return $bind;