From 223a31224b9c140c9369358b6978c55ef289fde1 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 12 Feb 2025 11:22:43 +0200 Subject: hotfix: Replace environment variables with php global constants --- controllers/archive.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'controllers/archive.php') diff --git a/controllers/archive.php b/controllers/archive.php index a3afb9f..8ef8dbf 100644 --- a/controllers/archive.php +++ b/controllers/archive.php @@ -10,6 +10,7 @@ use ValueError; set_time_limit(300); function on_post() { + global $ARCHIVES_DIR; if (!array_key_exists('async', $_POST) || $_POST['async'] !== 'true') { return; } @@ -19,7 +20,7 @@ function on_post() { global $TOKEN; $WEBSITE_CATEGORY = 'url'; - $DOWNLOADS_FOLDER = getenv('ARCHIVES_DIR'); + $DOWNLOADS_FOLDER = $ARCHIVES_DIR; $website_url = htmlspecialchars($_POST[$WEBSITE_CATEGORY]); $uid = 1; $authorized = false; -- cgit v1.2.3