Add check to make sure audit log location is writeable
Some cleanups
This commit is contained in:
@@ -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
@@ -166,4 +166,6 @@ File List Modal
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
|
||||
.redText {
|
||||
color: #ff4d4d;
|
||||
}
|
||||
+6
-1
@@ -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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user