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 84d9d87..9fd9bf3 100644 --- a/pages/docs.inc +++ b/pages/docs.inc @@ -38,7 +38,7 @@ function showDocument($item) { ?> <div style="display: grid; grid-template-columns: 2fr repeat(3, 1fr);"> <span> <?= $item["name"] ?> - <?php if ($item["nsfw"]): ?> + <?php if (isset($item["nsfw"]) && $item["nsfw"]): ?> <span class="badge bg-danger rounded-pill">NSFW</span> <?php endif; ?> </span> @@ -58,13 +58,13 @@ function showDocument($item) { ?> <div class="container"> <div> <?php if (isset($data)): ?><div id="page-content"> - <?php if ($data["nsfw"]): ?><script>requestExplicit("back");</script><?php endif; ?> + <?php if (isset($data["nsfw"]) && $data["nsfw"]): ?><script>requestExplicit("back");</script><?php endif; ?> <h2> <span contenteditable="true" id="document-name" style="outline: none;"><?= $data["name"] ?></span> <a href="/-/docs" class="small btn btn-outline-light" style="float:right;margin-top:5px;vertical-align:middle;opacity:1 !important; color:white;">Back</a> </h2> <p><b>Category:</b> <span id="category" contenteditable="true" style="outline: none;"><?= $data["category"] ?? "Unsorted" ?></span> ยท <label style="margin-bottom:5px;"> - <input <?= $data["nsfw"] ? "checked" : "" ?> class="form-check-input" type="checkbox" id="explicit"> + <input <?= (isset($data["nsfw"]) && $data["nsfw"]) ? "checked" : "" ?> class="form-check-input" type="checkbox" id="explicit"> Explicit </label></p> <p> |