diff options
Diffstat (limited to 'pages/api/docs.php')
-rw-r--r-- | pages/api/docs.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pages/api/docs.php b/pages/api/docs.php index d279765..51b92f5 100644 --- a/pages/api/docs.php +++ b/pages/api/docs.php @@ -1,6 +1,7 @@ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $_PROFILE; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; if (!$isLoggedIn) header("Location: /-/login") and die(); $request_raw = file_get_contents('php://input'); @@ -26,4 +27,5 @@ if ($json_object["category"]) $data["category"] = trim($json_object["category"]) $data["last"]["date"] = time(); $data["last"]["author"] = $_PROFILE['login']; -file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $select . ".json", utf8_encode(json_encode($data)));
\ No newline at end of file +file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $select . ".json", utf8_encode(json_encode($data))); +createJob("CleanupDocs", []);
\ No newline at end of file |