aboutsummaryrefslogtreecommitdiff
path: root/app/class/Page.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-17 19:14:36 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-17 19:14:36 +0100
commit8e10d770c74acdbb5795e8fc73fd220b900d75aa (patch)
treead2be14770a02a9507da11c7e0b174329ee37d34 /app/class/Page.php
parent19b603a228a63ae91d45a16dc104f795ea0cd244 (diff)
downloadwcms-8e10d770c74acdbb5795e8fc73fd220b900d75aa.tar.gz
wcms-8e10d770c74acdbb5795e8fc73fd220b900d75aa.zip
new feature : sleep time per page
Diffstat (limited to 'app/class/Page.php')
-rw-r--r--app/class/Page.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/class/Page.php b/app/class/Page.php
index 41cf0ab..170a057 100644
--- a/app/class/Page.php
+++ b/app/class/Page.php
@@ -43,6 +43,7 @@ class Page
protected $visitcount;
protected $editcount;
protected $editby;
+ protected $sleep;
const LEN = 255;
@@ -112,6 +113,7 @@ class Page
$this->setvisitcount(0);
$this->seteditcount(0);
$this->seteditby([]);
+ $this->setsleep(0);
}
public static function classvarlist()
@@ -454,6 +456,11 @@ class Page
return $this->editby;
}
+ public function sleep($type = 'int')
+ {
+ return $this->sleep;
+ }
+
@@ -819,6 +826,15 @@ class Page
return count($this->editby) > 0;
}
+ public function setsleep($sleep)
+ {
+ $sleep = abs(intval($sleep));
+ if($sleep > 180) {
+ $sleep = 180;
+ }
+ $this->sleep = $sleep;
+ }
+
/**
* Merge new tag with actual tags
*