diff options
author | Minteck <contact@minteck.org> | 2022-11-11 23:47:49 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-11-11 23:47:49 +0100 |
commit | 209356b8ade1920b50d1d3a1a5e121c6623d167b (patch) | |
tree | 5301396987d1510f715a0b1c24754873af19e1dc /pages/docs.inc | |
parent | 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (diff) | |
download | pluralconnect-209356b8ade1920b50d1d3a1a5e121c6623d167b.tar.gz pluralconnect-209356b8ade1920b50d1d3a1a5e121c6623d167b.tar.bz2 pluralconnect-209356b8ade1920b50d1d3a1a5e121c6623d167b.zip |
Update
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"] ?> |