aboutsummaryrefslogtreecommitdiff
path: root/controllers/archive.php
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-02-12 11:22:43 +0200
committerSyndamia <kamen@syndamia.com>2025-02-12 11:22:43 +0200
commit223a31224b9c140c9369358b6978c55ef289fde1 (patch)
treebdf9ad64e5c4d475cb7732d1c4e7b33f7d718e0d /controllers/archive.php
parent62a6f96f42d3f799e5beded2407ca53295a803f2 (diff)
downloadnowayforward_human-223a31224b9c140c9369358b6978c55ef289fde1.tar
nowayforward_human-223a31224b9c140c9369358b6978c55ef289fde1.tar.gz
nowayforward_human-223a31224b9c140c9369358b6978c55ef289fde1.zip
hotfix: Replace environment variables with php global constants
Diffstat (limited to 'controllers/archive.php')
-rw-r--r--controllers/archive.php3
1 files changed, 2 insertions, 1 deletions
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;