Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-09-14 07:23:23 +0400
committermattab <matthieu.aubry@gmail.com>2013-09-14 07:23:23 +0400
commite3bd0c0b9e8bd34efd27d31fe310602fcfc3a894 (patch)
tree9e8873a2410dedb65b3e725bf537d4781047b7b7 /misc
parent8d11a25fa7f41212584a58998c59884a4b9836d4 (diff)
Moving piwik settings specific getters to SettingsPiwik class
Adding MetricsFormatter class which knows how to format/display metrics (time, money, size, etc)
Diffstat (limited to 'misc')
-rw-r--r--misc/cron/archive.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index c8ff067b1c..7b8580dcea 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -153,7 +153,7 @@ class Archiving
// Try and not request older data we know is already archived
if ($this->timeLastCompleted !== false) {
$dateLast = time() - $this->timeLastCompleted;
- $this->log("- Archiving was last executed without error " . Piwik::getPrettyTimeFromSeconds($dateLast, true, $isHtml = false) . " ago");
+ $this->log("- Archiving was last executed without error " . \Piwik\MetricsFormatter::getPrettyTimeFromSeconds($dateLast, true, $isHtml = false) . " ago");
}
$this->initWebsitesToProcess();
@@ -251,7 +251,7 @@ class Archiving
&& $elapsedSinceLastArchiving < $this->todayArchiveTimeToLive
) {
$this->log("Skipped website id $idsite, already processed today's report in recent run, "
- . Piwik::getPrettyTimeFromSeconds($elapsedSinceLastArchiving, true, $isHtml = false)
+ . \Piwik\MetricsFormatter::getPrettyTimeFromSeconds($elapsedSinceLastArchiving, true, $isHtml = false)
. " ago, " . $timerWebsite->__toString());
$skippedDayArchivesWebsites++;
$skipped++;
@@ -405,7 +405,7 @@ class Archiving
private function getSegmentsForSite($idsite)
{
$segmentsAllSites = $this->segments;
- $segmentsThisSite = Piwik::getKnownSegmentsToArchiveForSite($idsite);
+ $segmentsThisSite = \Piwik\SettingsPiwik::getKnownSegmentsToArchiveForSite($idsite);
if (!empty($segmentsThisSite)) {
$this->log("Will pre-process the following " . count($segmentsThisSite) . " Segments for this website (id = $idsite): " . implode(", ", $segmentsThisSite));
}
@@ -731,12 +731,12 @@ class Archiving
if (empty($timestampActiveTraffic)) {
$timestampActiveTraffic = time() - $this->firstRunActiveWebsitesWithTraffic;
$this->log("--force-all-periods was detected: we will process websites with visits in the last "
- . Piwik::getPrettyTimeFromSeconds($this->firstRunActiveWebsitesWithTraffic, true, false)
+ . \Piwik\MetricsFormatter::getPrettyTimeFromSeconds($this->firstRunActiveWebsitesWithTraffic, true, false)
);
}
$this->websites = SitesManagerAPI::getInstance()->getSitesIdWithVisits($timestampActiveTraffic);
$websiteIds = !empty($this->websites) ? ", IDs: " . implode(", ", $this->websites) : "";
- $prettySeconds = Piwik::getPrettyTimeFromSeconds(empty($this->timeLastCompleted)
+ $prettySeconds = \Piwik\MetricsFormatter::getPrettyTimeFromSeconds(empty($this->timeLastCompleted)
? $this->firstRunActiveWebsitesWithTraffic
: (time() - $this->timeLastCompleted),
true, false);