diff options
Diffstat (limited to 'pages/docs.inc')
-rw-r--r-- | pages/docs.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pages/docs.inc b/pages/docs.inc index 0322f32..6d01489 100644 --- a/pages/docs.inc +++ b/pages/docs.inc @@ -22,7 +22,7 @@ if ($select === "add") { die(); } elseif (isset($select)) { if (ctype_alnum($select) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $select . ".json")) { - $id = $select; + $id = $_documentId = $select; $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $select . ".json"), true); $titleBase = " · " . $title . " · Cold Haze"; $title = $data["name"] . " · " . $title; @@ -141,7 +141,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; saving = true; try { - await window.fetch("/api/docs?id=<?= $id ?>", { + await window.fetch("/api/docs?id=<?= $_documentId ?>", { method: "POST", body: JSON.stringify({ content: data, name: document.getElementById("document-name").innerText, category: document.getElementById("category").innerText }) }); @@ -289,7 +289,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; <?php endforeach; ?></div> <hr> - <h4>Marked for deletion</h4><div class="list-group"> + <h4 id="deletable">Marked for deletion</h4><div class="list-group"> <?php foreach ($deletable as $item): ?> <a href="/-/docs/<?= $item["id"] ?>" id="document-<?= $item["id"] ?>" class="list-group-item list-group-item-action document-listing <?php if (strip_tags($item["contents"]) === "/delete"): ?>opacity-75<?php endif; ?>"> <?= $item["name"] ?> |