aboutsummaryrefslogtreecommitdiff
path: root/controllers/archive.php
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-01-26 22:00:21 +0200
committerSyndamia <kamen@syndamia.com>2025-01-26 22:21:31 +0200
commitedf446fae669f3370609f5a955c3d6c863a93524 (patch)
treec46984167cc5b79c51b243602f7a4837d428fd82 /controllers/archive.php
parent73ad3e330be1a6849269fec5d4b7b42b0330cede (diff)
downloadnowayforward_human-edf446fae669f3370609f5a955c3d6c863a93524.tar
nowayforward_human-edf446fae669f3370609f5a955c3d6c863a93524.tar.gz
nowayforward_human-edf446fae669f3370609f5a955c3d6c863a93524.zip
feat: Replace sessionStorage with (custom) cookieStorage
Diffstat (limited to 'controllers/archive.php')
-rw-r--r--controllers/archive.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/controllers/archive.php b/controllers/archive.php
index dbce6c3..0941d12 100644
--- a/controllers/archive.php
+++ b/controllers/archive.php
@@ -5,13 +5,15 @@ use DOMDocument;
use Exception;
function on_post() {
+ global $TOKEN;
+
$WEBSITE_CATEGORY = 'page_url';
$DOWNLOADS_FOLDER = getenv('ARCHIVES_DIR');
$website_url = $_POST[$WEBSITE_CATEGORY];
$uid = 1;
- if (array_key_exists('token', $_POST) && strlen($_POST['token']) === 36) {
+ if ($TOKEN !== "") {
try {
- $uid = Database\Cookie::fromDB($_POST['token'])->UID;
+ $uid = Database\Cookie::fromDB($TOKEN)->UID;
}
catch (Exception $e) {}
}