aboutsummaryrefslogtreecommitdiff
path: root/admin/api/autosave.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/api/autosave.php')
-rw-r--r--admin/api/autosave.php31
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