piwik/piwik — pull request #206 by clearcode (2014-01-22 08:58:26+00:00)
Title: Switched from reading raw config values to PrivacyManager::getPurgeDataS...

...ettings() so if PiwikOption holds different configuration than config file it, proper values are taken to calculations.

How to reproduce original error:
- Enable log deleting in config.ini.php with small interval (i.e. 1 day)
- override those options via UI with bigger interval (i.e. 90 days)
- try to use invalidateArchivedReports() method with date between 1 and 90 days back from today - it will cause warning and reports for given date will not be invalidated even though they actually could be.

This patch fixes this behaviour so the same dates are being considered in both places.