diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-12 11:22:43 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-12 11:22:43 +0200 |
| commit | 223a31224b9c140c9369358b6978c55ef289fde1 (patch) | |
| tree | bdf9ad64e5c4d475cb7732d1c4e7b33f7d718e0d /controllers | |
| parent | 62a6f96f42d3f799e5beded2407ca53295a803f2 (diff) | |
| download | nowayforward_human-223a31224b9c140c9369358b6978c55ef289fde1.tar nowayforward_human-223a31224b9c140c9369358b6978c55ef289fde1.tar.gz nowayforward_human-223a31224b9c140c9369358b6978c55ef289fde1.zip | |
hotfix: Replace environment variables with php global constants
Diffstat (limited to 'controllers')
| -rw-r--r-- | controllers/archive.php | 3 | ||||
| -rw-r--r-- | controllers/meta.php | 2 |
2 files changed, 4 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; diff --git a/controllers/meta.php b/controllers/meta.php index 46550d3..aa7a09b 100644 --- a/controllers/meta.php +++ b/controllers/meta.php @@ -1,5 +1,7 @@ <?php +include_once __DIR__ . '/../constants.php'; + function call_handler(string $name) { if (function_exists($name)) { call_user_func($name); |
