From 5e1ca86211da0439003303cf3e0741edf31bced4 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 29 Jan 2019 13:39:28 +0100 Subject: home redirect --- app/class/controllerhome.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'app/class/controllerhome.php') diff --git a/app/class/controllerhome.php b/app/class/controllerhome.php index cc2850f..043ac3e 100644 --- a/app/class/controllerhome.php +++ b/app/class/controllerhome.php @@ -16,17 +16,22 @@ class Controllerhome extends Controller public function desktop() { + if($this->user->isvisitor() && Config::homepage() === 'redirect' && Config::homeredirect() !== null) { + $this->routedirect('artread/', ['art' => Config::homeredirect()]); + } else { - $table = $this->modelhome->getlister(); - $this->opt = $this->modelhome->optinit($table); - - $table2 = $this->modelhome->table2($table, $this->opt); - - $columns = $this->modelhome->setcolumns($this->user->columns()); - - $this->showtemplate('home', ['user' => $this->user, 'table2' => $table2, 'opt' =>$this->opt, 'columns' => $columns]); - - + + $table = $this->modelhome->getlister(); + $this->opt = $this->modelhome->optinit($table); + + $table2 = $this->modelhome->table2($table, $this->opt); + + $columns = $this->modelhome->setcolumns($this->user->columns()); + + $this->showtemplate('home', ['user' => $this->user, 'table2' => $table2, 'opt' =>$this->opt, 'columns' => $columns]); + + + } } public function columns() -- cgit v1.2.3