aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerhome.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-22 22:13:28 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-22 22:13:28 +0200
commitbd16dc7c6fc630a6b59ca3b041dde146ab50c72b (patch)
treeb2f6a42c0bdb23606c1e9fdba0c28f0aee6b1786 /app/class/Controllerhome.php
parenteba4d7aa0ee5ea1bcb29e8254c28a272023ea54f (diff)
downloadwcms-bd16dc7c6fc630a6b59ca3b041dde146ab50c72b.tar.gz
wcms-bd16dc7c6fc630a6b59ca3b041dde146ab50c72b.zip
colors refactor with exceptions
Diffstat (limited to 'app/class/Controllerhome.php')
-rw-r--r--app/class/Controllerhome.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php
index d1c7a11..6e2155a 100644
--- a/app/class/Controllerhome.php
+++ b/app/class/Controllerhome.php
@@ -28,7 +28,9 @@ class Controllerhome extends Controllerpage
$pagelist = $this->modelhome->pagelist();
$this->opt = $this->modelhome->optinit($pagelist);
- $vars['colors'] = new Colors($this->opt->taglist());
+
+ $vars['colors'] = new Colors(Model::COLORS_FILE, $this->opt->taglist());
+
$deepsearch = $this->deepsearch();
@@ -130,10 +132,8 @@ class Controllerhome extends Controllerpage
public function colors()
{
if (isset($_POST['tagcolor']) && $this->user->issupereditor()) {
- $colors = new Colors();
- $colors->hydrate($_POST);
- $colors->tocss();
- $colors->writecssfile();
+ $colors = new Colors(Model::COLORS_FILE);
+ $colors->update($_POST['tagcolor']);
}
$this->routedirect('home');
}