CoreAdminHome.invalidateArchivedReports says it supports range dates in doc but doesn't really support it #9898
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
Milestone
See https://github.com/piwik/piwik/blob/2.16.1-b1/plugins/CoreAdminHome/API.php#L65
The API method says on can use a range date, which is technically true. However, it will simply convert all set dates into range dates. Eg when passing
2016-02-10,2016-02-23
it will invalidate the range dates2016-02-10,2016-02-10
and2016-02-23,2016-02-23
which doesn't make any sense since it's simply a single day.Instead the API should eg require that a number of dates is given that is dividable by 2
numberOfDates % 2 == 0
. We can then for example always concatenate two dates to build an actual range date. This is kind of changing API behaviour but current way wouldn't invalidate anything. And in case this is actually wanted we could still on top invalidate each single day as well like it was done before.The text was updated successfully, but these errors were encountered: