diff options
Diffstat (limited to 'app/class/Controllerpage.php')
-rw-r--r-- | app/class/Controllerpage.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php index e864dd3..2e1c285 100644 --- a/app/class/Controllerpage.php +++ b/app/class/Controllerpage.php @@ -131,15 +131,25 @@ class Controllerpage extends Controller if ($pageexist) { $canread = $this->user->level() >= $this->page->secure(); + // Check page password + if (!empty($this->page->password())) { + if (empty($_POST['pagepassword']) || $_POST['pagepassword'] !== $this->page->password()) { + $this->showtemplate('pagepassword', ['pageid' => $this->page->id()]); + exit; + } + } + if ($this->page->daterender() < $this->page->datemodif()) { if (Config::reccursiverender()) { $this->reccursiverender($this->page); } $this->page = $this->renderpage($this->page); } + + if ($canread) { $this->page->addaffcount(); - if ($this->user->level() < 2) { + if ($this->user->isvisitor()) { $this->page->addvisitcount(); } } |