aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/class/controlleradmin.php16
-rw-r--r--app/view/templates/admin.php3
-rw-r--r--composer.json2
3 files changed, 14 insertions, 7 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;
+ }
+ }
}
diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php
index 08126a7..3eba1c4 100644
--- a/app/view/templates/admin.php
+++ b/app/view/templates/admin.php
@@ -134,7 +134,8 @@
<h4>Edit quick menu</h4>
<div class="checkbox">
- <input type="checkbox" name="showeditmenu" id="showeditmenu" <?= Config::showeditmenu() === true ? 'checked' : '' ?>>
+ <input type="hidden" name="showeditmenu" value="false">
+ <input type="checkbox" name="showeditmenu" id="showeditmenu" value="true" <?= Config::showeditmenu() === true ? 'checked' : '' ?>>
<label for="showeditmenu">Show editor menu in top right corner of pages</label>
</div>
diff --git a/composer.json b/composer.json
index c279a67..93abe2c 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "w-cms",
"description": "point'n think",
- "version": "1.2.2",
+ "version": "1.2.3",
"require": {
"michelf/php-markdown": "^1.8",
"league/plates": "3.*",