diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-08-09 15:58:37 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-08-09 15:58:37 +0200 |
commit | 93c827446737252c36d6d9daee7e2e7a55eb911b (patch) | |
tree | c3c602a65e971b0953ff9c6d98cbb2b017964b12 /app/class/controllerart.php | |
parent | 95ada5c09026882f384a4a386916b1b2decbfce9 (diff) | |
download | wcms-93c827446737252c36d6d9daee7e2e7a55eb911b.tar.gz wcms-93c827446737252c36d6d9daee7e2e7a55eb911b.zip |
New Feature : Alert pages have more options
Diffstat (limited to 'app/class/controllerart.php')
-rw-r--r-- | app/class/controllerart.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/class/controllerart.php b/app/class/controllerart.php index 027fc19..ac52043 100644 --- a/app/class/controllerart.php +++ b/app/class/controllerart.php @@ -118,7 +118,6 @@ class Controllerart extends Controller $artexist = $this->importart(); $canread = $this->user->level() >= $this->art->secure(); - $alerts = ['alertnotexist' => 'This page does not exist yet', 'alertprivate' => 'You cannot see this page']; $page = ['head' => '', 'body' => '']; if ($artexist) { @@ -138,9 +137,13 @@ class Controllerart extends Controller } $this->artmanager->update($this->art); } - $data = array_merge($alerts, $page, ['art' => $this->art, 'artexist' => $artexist, 'canread' => $canread, 'readernav' => Config::showeditmenu(), 'canedit' => $this->canedit()]); + $data = array_merge($page, ['art' => $this->art, 'artexist' => $artexist , 'readernav' => Config::showeditmenu(), 'canedit' => $this->canedit()]); - $this->showtemplate('read', $data); + if($artexist && $canread) { + $this->showtemplate('read', $data); + } else { + $this->showtemplate('alert', $data); + } } |