Add check to make sure audit log location is writeable

Some cleanups
This commit is contained in:
Andy Dixon
2024-10-09 21:06:37 +01:00
parent e5ff977ca4
commit 03161dbeaa
5 changed files with 43 additions and 27 deletions
+16 -7
View File
@@ -1,15 +1,22 @@
# NeoCMS
## Version 2.0
Welcome to NeoCMS, the super lightweight, database-free content management system! Built with PHP and JavaScript, NeoCMS is designed to be fast and easy to use. No complicated setup required—just drop it into your static website, and you’re good to go.
Welcome to NeoCMS, the super lightweight, database-free content management system! Built with PHP and JavaScript, NeoCMS
is designed to be fast and easy to use. No complicated setup required—just drop it into your static website, and you’re
good to go.
Version 2.0 is a complete overhaul to support the latest versions of jQuery and TinyMCE (GPL). We’ve made things even smoother for your content editing experience.
Version 2.0 is a complete overhaul to support the latest versions of jQuery and TinyMCE (GPL). We’ve made things even
smoother for your content editing experience.
## Features
* No Database Required: NeoCMS works without a database, so you don’t have to worry about setup hassles or performance slowdowns.
* Easy Content Editing: With our intuitive WYSIWYG editor, anyone can update content without writing a single line of code.
* Seamless Integration: Simply add the CMS to any existing static website. Just assign a special class to the elements you want to make editable, and you’re all set.
* No Database Required: NeoCMS works without a database, so you don’t have to worry about setup hassles or performance
slowdowns.
* Easy Content Editing: With our intuitive WYSIWYG editor, anyone can update content without writing a single line of
code.
* Seamless Integration: Simply add the CMS to any existing static website. Just assign a special class to the elements
you want to make editable, and you’re all set.
* Consistent Layouts: NeoCMS supports page templates to keep your layouts neat and uniform across all pages.
## Installation Guide
@@ -35,10 +42,12 @@ That’s it! You’re up and running.
## License
NeoCMS is open-source software licensed under the GNU General Public License v3.0 (GPLv3). You are free to use, modify, and distribute this software under the terms of this license.
NeoCMS is open-source software licensed under the GNU General Public License v3.0 (GPLv3). You are free to use, modify,
and distribute this software under the terms of this license.
For more information, see the full GPLv3 License found in LICENSE.
## Found a Bug?
If you run into any issues or have feature requests, please submit them on our GitHub issues page. Your feedback helps us improve NeoCMS!
If you run into any issues or have feature requests, please submit them on our GitHub issues page. Your feedback helps
us improve NeoCMS!
+2 -2
View File
@@ -7,9 +7,9 @@ switch ($_REQUEST["action"]) {
header('Content-type: application/json');
if (!empty($_POST['uri']) && !empty($_POST['content'])) {
$_SESSION['core']->saveContent($_POST['uri'], $_POST['content']);
echo json_encode(array('message'=>'Page has been saved'));
echo json_encode(array('message' => 'Page has been saved'));
} else {
echo json_encode(array('error'=>'Unable to save page'));
echo json_encode(array('error' => 'Unable to save page'));
}
break;
+3 -1
View File
@@ -166,4 +166,6 @@ File List Modal
background-color: #e0e0e0;
}
.redText {
color: #ff4d4d;
}
+6 -1
View File
@@ -36,7 +36,12 @@ require_once "init.php";
</ul>
</div>
<div class="loggedInDetails">
Logged in as: <?php echo $_SESSION["core"]->getLoggedinUser(); ?>
Logged in as: <?php echo $_SESSION["core"]->getLoggedinUser(); ?><br />
<?php
if ( ! is_writable("logs/")) {
echo "<span style='redText'>Make /cms/logs/ writeable!</span>";
}
?>
</div>
</div>
<iframe id="frameContainer" src="welcome.html" class="frame"></iframe>
+16 -16
View File
@@ -24,22 +24,22 @@ $(document).ready(function () {
// Open the modal and init tinyMCE
$('#editModal').modal('show')
.on('shown.bs.modal', function () {
tinymce.init({
promotion: false,
branding: false,
selector: '#editor',
height: 300,
plugins: 'print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount textpattern noneditable help charmap quickbars emoticons',
toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl',
images_upload_url: '/cms/image_upload.php',
automatic_uploads: true,
images_reuse_filename: false,
images_upload_credentials: true,
force_br_newlines: false,
force_p_newlines: false,
newline_behavior: 'linebreak'
tinymce.init({
promotion: false,
branding: false,
selector: '#editor',
height: 300,
plugins: 'print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount textpattern noneditable help charmap quickbars emoticons',
toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl',
images_upload_url: '/cms/image_upload.php',
automatic_uploads: true,
images_reuse_filename: false,
images_upload_credentials: true,
force_br_newlines: false,
force_p_newlines: false,
newline_behavior: 'linebreak'
});
});
});
});
});
@@ -70,7 +70,7 @@ $(document).ready(function () {
// Handle Saving changes to the page
$('#savePage').click(() => {
frameContainerElement=$('#frameContainer').contents().get(0);
frameContainerElement = $('#frameContainer').contents().get(0);
$.post("/cms/controller/", {
action: "save",
uri: frameContainerElement.location.pathname,