diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-21 12:01:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-21 12:01:36 +0400 |
commit | aca8ec33a85e0a70b818b6227145041717d7a69e (patch) | |
tree | 41377e3a9737d63222522ef93ecf8483f3faddfa /misc | |
parent | 0a63210e3eae7562af1a3dbee340eb1ee140db3d (diff) |
Refs #4059 Work in progress: Conversion to use Namespaces: Period*, Metrics, Segment, SegmentExpression, PluginsManager.
Removed some deprecated code.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cron/archive.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php index 280574ac64..45e8abe88a 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -1,7 +1,9 @@ <?php +use Piwik\ArchiveProcessor\Rules; use Piwik\Config; use Piwik\Piwik; use Piwik\Common; +use Piwik\Date; $USAGE = " Usage: @@ -131,7 +133,7 @@ class Archiving $this->log("Notes"); // Information about timeout - $this->todayArchiveTimeToLive = Piwik_ArchiveProcessor_Rules::getTodayArchiveTimeToLive(); + $this->todayArchiveTimeToLive = Rules::getTodayArchiveTimeToLive(); $this->log("- Reports for today will be processed at most every " . $this->todayArchiveTimeToLive . " seconds. You can change this value in Piwik UI > Settings > General Settings."); $this->log("- Reports for the current week/month/year will be refreshed at most every " @@ -669,7 +671,7 @@ class Archiving ) // in case --force-timeout-for-periods= without [seconds] specified { // Ensure the cache for periods is at least as high as cache for today - $todayTTL = Piwik_ArchiveProcessor_Rules::getTodayArchiveTimeToLive(); + $todayTTL = Rules::getTodayArchiveTimeToLive(); if ($forceTimeoutPeriod < $todayTTL) { $this->log("WARNING: Automatically increasing --force-timeout-for-periods from $forceTimeoutPeriod to " . $todayTTL @@ -680,7 +682,7 @@ class Archiving } // Recommend to disable browser archiving when using this script - if (Piwik_ArchiveProcessor_Rules::isBrowserTriggerEnabled()) { + if (Rules::isBrowserTriggerEnabled()) { $this->log("NOTE: if you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Piwik UI > Settings > General Settings. "); $this->log(" see doc at: http://piwik.org/docs/setup-auto-archiving/"); } @@ -752,8 +754,8 @@ class Archiving $uniqueTimezones = Piwik_SitesManager_API::getInstance()->getUniqueSiteTimezones(); $timezoneToProcess = array(); foreach ($uniqueTimezones as &$timezone) { - $processedDateInTz = Piwik_Date::factory((int)$timestampActiveTraffic, $timezone); - $currentDateInTz = Piwik_Date::factory('now', $timezone); + $processedDateInTz = Date::factory((int)$timestampActiveTraffic, $timezone); + $currentDateInTz = Date::factory('now', $timezone); if ($processedDateInTz->toString() != $currentDateInTz->toString()) { $timezoneToProcess[] = $timezone; |