diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-05-20 02:11:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 02:11:33 +0300 |
commit | 97a8d900f67217dfcbad63fa77d8475a90486946 (patch) | |
tree | b7da37108059c66ea2b2c2c8a4d04c8468710496 | |
parent | f3dab82200f3b5f1aeb03ff97ae7954463abffbd (diff) |
Purge from year table as well. (#15963)
-rw-r--r-- | plugins/CoreAdminHome/Tasks.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/CoreAdminHome/Tasks.php b/plugins/CoreAdminHome/Tasks.php index ff3ae6497f..97180241cc 100644 --- a/plugins/CoreAdminHome/Tasks.php +++ b/plugins/CoreAdminHome/Tasks.php @@ -277,6 +277,12 @@ class Tasks extends \Piwik\Plugin\Tasks if (empty($purgedDates[$yesterdayStr])) { $this->archivePurger->purgeInvalidatedArchivesFrom($yesterday); } + + // handle year start table + $yearStart = $today->toString('Y-01'); + if (empty($purgedDates[$yearStart])) { + $this->archivePurger->purgeInvalidatedArchivesFrom(Date::factory($yearStart . '-01')); + } } public function optimizeArchiveTable() |