diff options
author | diosmosis <benaka@piwik.pro> | 2015-10-07 17:45:02 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-10-12 21:05:36 +0300 |
commit | e78ef88a875c4f5c5638e239a6ecd9a518b922aa (patch) | |
tree | b71b357bb7256853590af7811ccc2e2cd0f809b6 /core/Archive | |
parent | b36d6d5c61dcb934e27d0b99506be739744fd1f1 (diff) |
Make sure archive invalidation works for range periods.
Diffstat (limited to 'core/Archive')
-rw-r--r-- | core/Archive/ArchiveInvalidator.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php index e17a16311c..fa87617339 100644 --- a/core/Archive/ArchiveInvalidator.php +++ b/core/Archive/ArchiveInvalidator.php @@ -124,7 +124,7 @@ class ArchiveInvalidator /** * @param $idSites int[] * @param $dates Date[] - * @param $period string TODO: make multiple + * @param $period string * @param bool $cascadeDown * @return InvalidationResultInfo * @throws \Exception @@ -162,6 +162,10 @@ class ArchiveInvalidator $periodsToInvalidate = array(); foreach ($dates as $date) { + if ($periodType == 'range') { + $date = $date . ',' . $date; + } + $period = Period\Factory::build($periodType, $date); $periodsToInvalidate[] = $period; @@ -207,7 +211,7 @@ class ArchiveInvalidator /** * @param int[] $idSites - * @param Period[][] $periods + * @param Period[][][] $periods * @throws \Exception */ private function markArchivesInvalidated($idSites, $periods) |