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
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-10-14 08:20:49 +0400
committermattab <matthieu.aubry@gmail.com>2013-10-14 08:20:49 +0400
commit45933aad796c3cfcbab8c6fe4bd6d04d2dc3c3bd (patch)
treea9743e4bc5f0487dfea8722789a20e4c2e1ab770 /core/Tracker/Request.php
parent6a11c972c69ff80627a62adbee8afd1179424696 (diff)
Minor
Diffstat (limited to 'core/Tracker/Request.php')
-rw-r--r--core/Tracker/Request.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php
index 8a7218979f..a26a9f1f79 100644
--- a/core/Tracker/Request.php
+++ b/core/Tracker/Request.php
@@ -527,4 +527,20 @@ class Request
{
return count($this->params);
}
+
+
+ const GENERATION_TIME_MS_MAXIMUM = 3600000; // 1 hour
+
+ public function getPageGenerationTime()
+ {
+ $generationTime = $this->getParam('gt_ms');
+ if ($generationTime > 0
+ && $generationTime < self::GENERATION_TIME_MS_MAXIMUM
+ ) {
+ return (int)$generationTime;
+ }
+ return false;
+ }
+
+
}