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
path: root/core
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-01-22 02:10:17 +0400
committermattab <matthieu.aubry@gmail.com>2014-01-22 02:10:17 +0400
commit1948b754cc13fa8a144bf8ac63f9fed1b24470cd (patch)
treea878e051b9ea5e45fb821feb7ce54d480b228714 /core
parent39e7d13ca8c1b0da6c7769b135362b6e83e4a2f0 (diff)
Call Table\Manager::deleteAll() for both Days and Periods, not only for Periods
Diffstat (limited to 'core')
-rw-r--r--core/ArchiveProcessor.php3
-rw-r--r--core/ArchiveProcessor/PluginsArchiver.php8
2 files changed, 8 insertions, 3 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index 6aa62cdc9d..a8eaaf7056 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -194,8 +194,6 @@ class ArchiveProcessor
&$columnsAggregationOperation = null,
$columnsToRenameAfterAggregation = null)
{
- // We clean up below all tables created during this function call (and recursive calls)
- $latestUsedTableId = Manager::getInstance()->getMostRecentTableId();
if (!is_array($recordNames)) {
$recordNames = array($recordNames);
}
@@ -210,7 +208,6 @@ class ArchiveProcessor
Common::destroy($table);
$this->insertBlobRecord($recordName, $blob);
}
- Manager::getInstance()->deleteAll($latestUsedTableId);
return $nameToCount;
}
diff --git a/core/ArchiveProcessor/PluginsArchiver.php b/core/ArchiveProcessor/PluginsArchiver.php
index 671e8272fb..c8a6859b53 100644
--- a/core/ArchiveProcessor/PluginsArchiver.php
+++ b/core/ArchiveProcessor/PluginsArchiver.php
@@ -15,6 +15,7 @@ use Piwik\Archive;
use Piwik\ArchiveProcessor;
use Piwik\DataAccess\ArchiveSelector;
use Piwik\DataAccess\ArchiveWriter;
+use Piwik\DataTable\Manager;
use Piwik\Metrics;
use Piwik\Plugin\Archiver;
@@ -87,6 +88,10 @@ class PluginsArchiver
$archivers = $this->getPluginArchivers();
foreach($archivers as $pluginName => $archiverClass) {
+
+ // We clean up below all tables created during this function call (and recursive calls)
+ $latestUsedTableId = Manager::getInstance()->getMostRecentTableId();
+
/** @var Archiver $archiver */
$archiver = new $archiverClass($this->archiveProcessor);
@@ -97,6 +102,9 @@ class PluginsArchiver
$archiver->aggregateMultipleReports();
}
}
+
+ Manager::getInstance()->deleteAll($latestUsedTableId);
+ unset($archiver);
}
}