From 19d16efebc3fb5c0b2aede29aa91d31000ffd124 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Mon, 25 May 2020 19:48:15 +0200 Subject: add page specific password protection close #118 --- app/class/Page.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/class/Page.php') diff --git a/app/class/Page.php b/app/class/Page.php index a369aed..e5b84ac 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -45,6 +45,7 @@ class Page extends Dbitem protected $sleep; protected $redirection; protected $refresh; + protected $password; public const LEN = 255; @@ -109,6 +110,7 @@ class Page extends Dbitem $this->setsleep(0); $this->setredirection(''); $this->setrefresh(0); + $this->setpassword(''); } // _____________________________________________________ G E T ____________________________________________________ @@ -361,6 +363,11 @@ class Page extends Dbitem return $this->refresh; } + public function password($type = 'string') + { + return $this->password; + } + @@ -701,6 +708,13 @@ class Page extends Dbitem $this->refresh = $refresh; } + public function setpassword($password) + { + if (is_string($password) && strlen($password) > 0 && strlen($password) < 64) { + $this->password = $password; + } + } + // __________________________________ C O U N T E R S ______________________________ -- cgit v1.2.3