diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-12-04 20:39:48 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-12-04 20:39:48 +0100 |
commit | 42e89ac398bdf2a98167b0b71123c98e297b2130 (patch) | |
tree | 623c5e42d9b40a7372f17c070e2b39f52dc44ed1 /app/class/controlleradmin.php | |
parent | dd14929505e3fd0bc1710ed757b501d3ec1f6ca1 (diff) | |
download | wcms-42e89ac398bdf2a98167b0b71123c98e297b2130.tar.gz wcms-42e89ac398bdf2a98167b0b71123c98e297b2130.zip |
editor right bar
Diffstat (limited to 'app/class/controlleradmin.php')
-rw-r--r-- | app/class/controlleradmin.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/class/controlleradmin.php b/app/class/controlleradmin.php index 0829916..86d6db1 100644 --- a/app/class/controlleradmin.php +++ b/app/class/controlleradmin.php @@ -15,7 +15,10 @@ class Controlleradmin extends Controller } else { $defaultartexist = true; } - $admin = ['artlist' => $artlist, 'defaultartexist' => $defaultartexist]; + + $globalcss = file_get_contents(Model::GLOBAL_DIR . 'global.css'); + + $admin = ['artlist' => $artlist, 'defaultartexist' => $defaultartexist, 'globalcss' => $globalcss]; $this->showtemplate('admin', $admin); } } @@ -25,11 +28,13 @@ class Controlleradmin extends Controller if(!isset($_POST['showeditmenu'])) { $_POST['showeditmenu'] = false; } + $globalcss = file_put_contents(Model::GLOBAL_DIR . 'global.css', $_POST['globalcss']); + Config::hydrate($_POST); - if(Config::savejson() !== false) { + if(Config::savejson() !== false && $globalcss !== false) { $this->routedirect('admin'); } else { - echo 'Can\'t write config file'; + echo 'Can\'t write config file or global css file'; } } |