diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-14 08:20:49 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-14 08:20:49 +0400 |
commit | 45933aad796c3cfcbab8c6fe4bd6d04d2dc3c3bd (patch) | |
tree | a9743e4bc5f0487dfea8722789a20e4c2e1ab770 /core/Tracker/Request.php | |
parent | 6a11c972c69ff80627a62adbee8afd1179424696 (diff) |
Minor
Diffstat (limited to 'core/Tracker/Request.php')
-rw-r--r-- | core/Tracker/Request.php | 16 |
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; + } + + } |