diff options
author | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
commit | ef055e79855cf3be1ad5e1aa5f9ebad480062384 (patch) | |
tree | ff074b29a7a87c3ccfc3b10741bbe30cb28e103e /admin/api/autosave.php | |
parent | e3a79df6428799024eac64e9cffbb062317aeb95 (diff) | |
download | main-ef055e79855cf3be1ad5e1aa5f9ebad480062384.tar.gz main-ef055e79855cf3be1ad5e1aa5f9ebad480062384.tar.bz2 main-ef055e79855cf3be1ad5e1aa5f9ebad480062384.zip |
Diffstat (limited to 'admin/api/autosave.php')
-rw-r--r-- | admin/api/autosave.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/admin/api/autosave.php b/admin/api/autosave.php deleted file mode 100644 index 67943cb..0000000 --- a/admin/api/autosave.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php
-
-require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-
-if (isset($_POST['document']) && strpos($_POST['document'], "/") === false) {
- $doc = $_POST['document'];
-} else {
- echo("E_ABORT: document");
- die();
-}
-
-if (isset($_POST['article']) && strpos($_POST['article'], "/") === false) {
- $blog = $_POST['article'];
-}
-
-if (isset($_POST['content'])) {
- $data = $_POST['content'];
-} else {
- echo("E_ABORT: content");
- die();
-}
-
-echo("STEP");
-if ($_POST["document"] === "blog.en") {
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/blog-" . $blog . ".json.html", $data);
-} else if ($_POST["document"] === "blog.fr") {
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/blog-" . $blog . ".json.fr.html", $data);
-} else {
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/" . $doc . ".html", $data);
-}
-echo("SUCCESS");
\ No newline at end of file |