diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-04-14 16:01:27 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-04-14 16:01:27 +0200 |
commit | 05ea1fe723534ee29ef757dead0c94d0f6321a0b (patch) | |
tree | 586fafeb9cff2aec8d15424266cf2cbdf14072e4 /app/class | |
parent | 11f0907e2effff7af66040f037a95ab394dbd42c (diff) | |
download | wcms-05ea1fe723534ee29ef757dead0c94d0f6321a0b.tar.gz wcms-05ea1fe723534ee29ef757dead0c94d0f6321a0b.zip |
admin global dir bug fix
Diffstat (limited to 'app/class')
-rw-r--r-- | app/class/controlleradmin.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/class/controlleradmin.php b/app/class/controlleradmin.php index cf2dbc8..03fcb22 100644 --- a/app/class/controlleradmin.php +++ b/app/class/controlleradmin.php @@ -35,10 +35,9 @@ class Controlleradmin extends Controller } public function update() - { - if(!isset($_POST['showeditmenu'])) { - $_POST['showeditmenu'] = false; - } + { + $this->globaldircheck(); + $globalcss = file_put_contents(Model::GLOBAL_DIR . 'global.css', $_POST['globalcss']); Config::hydrate($_POST); @@ -50,7 +49,14 @@ class Controlleradmin extends Controller } - + public function globaldircheck() + { + if(!is_dir(Model::GLOBAL_DIR)) { + return mkdir(Model::GLOBAL_DIR); + } else { + return true; + } + } } |