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-19 04:50:47 +0400
committermattab <matthieu.aubry@gmail.com>2013-06-19 04:50:47 +0400
commita8aed8d2cc207c2dcfedf01442b2d35c99fd8cea (patch)
tree87d412b93767f388cbc7ce6d82142c38af98f6ba /core/ArchiveProcessor.php
parent8575c02aa74577c3674c367dc32c87f0865df00d (diff)
There is now a new error in PrivacyManagerTest, making some progress...
Diffstat (limited to 'core/ArchiveProcessor.php')
-rw-r--r--core/ArchiveProcessor.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index 714c4e821b..b25326d68f 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -279,13 +279,18 @@ abstract class Piwik_ArchiveProcessor
}
$this->logStatusDebug($requestedPlugin);
- if ($this->getNumberOfVisits() > 0
- && !$enforceProcessCoreMetricsOnly
- ) {
+ $isVisitsToday = $this->getNumberOfVisits() > 0;
+ if ($isVisitsToday
+ && !$enforceProcessCoreMetricsOnly) {
$this->compute();
}
$archiveWriter->finalizeArchive();
+
+ if ($isVisitsToday && $this->period->getLabel() != 'day') {
+ Piwik_DataAccess_ArchiveSelector::purgeOutdatedArchives($this->getPeriod()->getDateStart());
+ }
+
return $archiveWriter->getIdArchive();
}